diff --git a/repo/content/content_manager.go b/repo/content/content_manager.go index 54c459261..06bd41634 100644 --- a/repo/content/content_manager.go +++ b/repo/content/content_manager.go @@ -52,7 +52,7 @@ const ( parallelFetches = 5 // number of parallel reads goroutines - flushPackIndexTimeout = 10 * time.Minute // time after which all pending indexes are flushes + flushPackIndexTimeout = 10 * time.Minute // time after which all pending indexes are flushed defaultMinPreambleLength = 32 defaultMaxPreambleLength = 32 defaultPaddingUnit = 4096 @@ -858,7 +858,7 @@ func (bm *WriteManager) GetContent(ctx context.Context, contentID ID) (v []byte, _, err = bm.getContentDataAndInfo(ctx, contentID, &tmp) if err != nil { - bm.log.Debugf("getContentInfoReadLocked(%v) error %v", contentID, err) + bm.log.Debugf("getContentDataAndInfo(%v) error %v", contentID, err) return nil, err } diff --git a/snapshot/upload/upload_test.go b/snapshot/upload/upload_test.go index af11c0119..fc8398b99 100644 --- a/snapshot/upload/upload_test.go +++ b/snapshot/upload/upload_test.go @@ -1259,11 +1259,16 @@ func TestParallelUploadOfLargeFiles(t *testing.T) { fs.IterateEntries(ctx, dir, func(ctx context.Context, e fs.Entry) error { if f, ok := e.(fs.File); ok { - oid, err := object.ParseID(strings.TrimPrefix(f.(object.HasObjectID).ObjectID().String(), "I")) - require.NoError(t, err) + hoid, hasObjectId := f.(object.HasObjectID) + require.True(t, hasObjectId) + + oids := hoid.ObjectID().String() + + oid, err := object.ParseID(strings.TrimPrefix(oids, "I")) + require.NoError(t, err, "failed to parse object id", oids) entries, err := object.LoadIndexObject(ctx, th.repo.(repo.DirectRepositoryWriter).ContentManager(), oid) - require.NoError(t, err) + require.NoError(t, err, "failed to parse indirect object id", oid) // ensure that index object contains breakpoints at all multiples of 'chunkSize'. // Because we picked unusual chunkSize, this proves that uploads happened individually