[ARVADOS] updated: 2568adc289018055cecc16d2453b29482dce93af
git at public.curoverse.com
git at public.curoverse.com
Mon Oct 12 09:24:15 EDT 2015
Summary of changes:
services/keepstore/azure_blob_volume.go | 12 +++++++++---
services/keepstore/azure_blob_volume_test.go | 4 ++++
2 files changed, 13 insertions(+), 3 deletions(-)
via 2568adc289018055cecc16d2453b29482dce93af (commit)
via 77dce649ed93830e01aff38186bd928844599d9f (commit)
from 6f9c7f479d7522d28de80437fa01a2f88a85ad35 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 2568adc289018055cecc16d2453b29482dce93af
Author: Tom Clegg <tom at curoverse.com>
Date: Mon Oct 12 09:33:24 2015 -0400
7159: Shorten race waits during generic tests
diff --git a/services/keepstore/azure_blob_volume_test.go b/services/keepstore/azure_blob_volume_test.go
index c3fea9a..a4c6e62 100644
--- a/services/keepstore/azure_blob_volume_test.go
+++ b/services/keepstore/azure_blob_volume_test.go
@@ -339,6 +339,8 @@ func TestAzureBlobVolumeWithGeneric(t *testing.T) {
http.DefaultTransport = &http.Transport{
Dial: (&azStubDialer{}).Dial,
}
+ azureWriteRaceInterval = time.Millisecond
+ azureWriteRacePollTime = time.Nanosecond
DoGenericVolumeTests(t, func(t *testing.T) TestableVolume {
return NewTestableAzureBlobVolume(t, false, azureStorageReplication)
})
@@ -351,6 +353,8 @@ func TestReadonlyAzureBlobVolumeWithGeneric(t *testing.T) {
http.DefaultTransport = &http.Transport{
Dial: (&azStubDialer{}).Dial,
}
+ azureWriteRaceInterval = time.Millisecond
+ azureWriteRacePollTime = time.Nanosecond
DoGenericVolumeTests(t, func(t *testing.T) TestableVolume {
return NewTestableAzureBlobVolume(t, true, azureStorageReplication)
})
commit 77dce649ed93830e01aff38186bd928844599d9f
Author: Tom Clegg <tom at curoverse.com>
Date: Fri Oct 9 17:09:42 2015 -0400
7159: Log when waiting for get/put races
diff --git a/services/keepstore/azure_blob_volume.go b/services/keepstore/azure_blob_volume.go
index 7545e52..9531564 100644
--- a/services/keepstore/azure_blob_volume.go
+++ b/services/keepstore/azure_blob_volume.go
@@ -122,7 +122,7 @@ func (v *AzureBlobVolume) Get(loc string) ([]byte, error) {
var deadline time.Time
haveDeadline := false
buf, err := v.get(loc)
- for err == nil && len(buf) == 0 && loc[:32] != "d41d8cd98f00b204e9800998ecf8427e" {
+ for err == nil && len(buf) == 0 && loc != "d41d8cd98f00b204e9800998ecf8427e" {
// Seeing a brand new empty block probably means we're
// in a race with CreateBlob, which under the hood
// (apparently) does "CreateEmpty" and "CommitData"
@@ -134,15 +134,21 @@ func (v *AzureBlobVolume) Get(loc string) ([]byte, error) {
break
}
deadline = t.Add(azureWriteRaceInterval)
+ if time.Now().After(deadline) {
+ break
+ }
+ log.Printf("Race? Block %s is 0 bytes, %s old. Polling until %s", loc, time.Since(t), deadline)
haveDeadline = true
- }
- if time.Now().After(deadline) {
+ } else if time.Now().After(deadline) {
break
}
bufs.Put(buf)
time.Sleep(azureWriteRacePollTime)
buf, err = v.get(loc)
}
+ if haveDeadline {
+ log.Printf("Race ended with len(buf)==%d", len(buf))
+ }
return buf, err
}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list