mirror of
https://github.com/dolthub/dolt.git
synced 2026-04-21 11:29:51 -05:00
go/store/chunks: memory_store.go: Fix MarkAndSweepChunks implementation to return successfully when keepChunks is closed.
This commit is contained in:
@@ -228,9 +228,13 @@ func (ms *MemoryStoreView) MarkAndSweepChunks(ctx context.Context, last hash.Has
|
||||
|
||||
keepers := make(map[hash.Hash]Chunk, ms.storage.Len())
|
||||
|
||||
LOOP:
|
||||
for {
|
||||
select {
|
||||
case h := <-keepChunks:
|
||||
case h, ok := <-keepChunks:
|
||||
if !ok {
|
||||
break LOOP
|
||||
}
|
||||
c, err := ms.Get(ctx, h)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user