diff --git a/seaweed-block/core/storage/chunk_birth_migration_test.go b/seaweed-block/core/storage/chunk_birth_migration_test.go index b969820a8e..7e6455508a 100644 --- a/seaweed-block/core/storage/chunk_birth_migration_test.go +++ b/seaweed-block/core/storage/chunk_birth_migration_test.go @@ -1,7 +1,6 @@ package storage import ( - "testing" ) @@ -29,4 +28,3 @@ func TestChunkBirthSeededFrontierPreservesInheritedImage(t *testing.T) { t.Fatalf("seeded image birth lost: %+v", cut.Head) } } - diff --git a/seaweed-block/core/storage/chunk_layer.go b/seaweed-block/core/storage/chunk_layer.go index ae5ed5a212..6dc51806b7 100644 --- a/seaweed-block/core/storage/chunk_layer.go +++ b/seaweed-block/core/storage/chunk_layer.go @@ -149,7 +149,7 @@ func attachChunkLayerImpl(s *WALStore, remote chunkRemote, cfg chunkLayerConfig) return nil, fmt.Errorf("%w: chunk layer requires the native owned map", ErrMapInvalid) } if remote == nil || cfg.ChunkBlocks == 0 { - return nil, errors.New("storage: chunk layer needs a remote, ChunkBlocks > 0 and a legacy bitmap unless the store owns an impl3 map") + return nil, errors.New("storage: chunk layer needs a remote and ChunkBlocks > 0") } var localBase bool s.captureMu.Lock() @@ -1401,7 +1401,6 @@ func (l *chunkLayerImpl) dropIntents(ctx context.Context, ids []string) { // stage uploads large native dirty sets through logical reads, before fixing H. // It stops when the spill-budget remainder is reached or a round makes no // progress. Versions/HEAD generation bind every reusable immutable result. -// Legacy fixtures retain their bounded-count rounds. func (l *chunkLayerImpl) stage(ctx context.Context, st *chunkCutStats) (map[uint64]stagedChunk, []string, error) { bound := l.cfg.BarrierBound diff --git a/seaweed-block/core/storage/chunk_layer_c11_test.go b/seaweed-block/core/storage/chunk_layer_c11_test.go index f407100604..cbcad3686d 100644 --- a/seaweed-block/core/storage/chunk_layer_c11_test.go +++ b/seaweed-block/core/storage/chunk_layer_c11_test.go @@ -9,7 +9,6 @@ package storage // It may over-report, never under-report. RED until the layer exists. import ( - "testing" ) @@ -33,4 +32,3 @@ func flushWithin(t *testing.T, s *WALStore, what string) error { within(t, what, func() error { ferr = s.flusher.flushOnce(); return nil }) return ferr } - diff --git a/seaweed-block/core/storage/walstore.go b/seaweed-block/core/storage/walstore.go index 6f0bac2303..e9dae9aeeb 100644 --- a/seaweed-block/core/storage/walstore.go +++ b/seaweed-block/core/storage/walstore.go @@ -132,7 +132,7 @@ type WALStore struct { instr writeInstrumentation // v3 is non-nil for a format-v3 store (walstore_v3.go). Production - // selectors use v3; legacy formats require explicit offline migration. + // selectors use v3; legacy files are refused without mutation. v3 *walStoreV3State // Physical WAL sync attempts exclude the separate metadata/checkpoint syncs. @@ -203,9 +203,7 @@ func OpenWALStoreWithOptions(path string, opts WALStoreOptions) (*WALStore, erro return openWALStoreV3WithOptions(path, true, opts) } -// openInitializedV3 is openInitializedWithMetadata with an optional -// init hook that runs before the committer and flusher goroutines start -// (the v3 store attaches its state there). +// openInitializedV3 binds native state before starting background workers. func openInitializedV3(path string, f *os.File, sb *superblock, metadata BlockMetadata, init func(*WALStore) error) (*WALStore, error) { dm := newDirtyMap(64) // 64 shards is plenty for Phase 07 demo workloads