Skip to content

Commit

Permalink
go: store/nbs: store.go: Fix GetManyCompressed to not redeliver chunk…
Browse files Browse the repository at this point in the history
…s on waitForGC retry.
  • Loading branch information
reltuk committed Feb 22, 2025
1 parent e4a4b5d commit 4ce49e6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions go/libraries/doltcore/doltdb/doltdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -1942,10 +1942,10 @@ type StoreSizes struct {
// but everything in it is in the old gen. In practice, given how we build
// oldgen references today, this will never be the case--there is always
// a little bit of data that only goes in the newgen.
NewGenBytes uint64
NewGenBytes uint64
// This is the approximate total on-disk storage overhead of the store.
// It includes Journal and NewGenBytes, if there are any.
TotalBytes uint64
TotalBytes uint64
}

func (ddb *DoltDB) StoreSizes(ctx context.Context) (StoreSizes, error) {
Expand All @@ -1964,13 +1964,13 @@ func (ddb *DoltDB) StoreSizes(ctx context.Context) (StoreSizes, error) {
if journal != nil {
return StoreSizes{
JournalBytes: uint64(journal.Size()),
NewGenBytes: newgenSz,
TotalBytes: totalSz,
NewGenBytes: newgenSz,
TotalBytes: totalSz,
}, nil
} else {
return StoreSizes{
NewGenBytes: newgenSz,
TotalBytes: totalSz,
TotalBytes: totalSz,
}, nil
}
} else {
Expand Down
4 changes: 2 additions & 2 deletions go/store/nbs/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -955,10 +955,10 @@ func (nbs *NomsBlockStore) getManyWithFunc(
nbs.stats.ChunksPerGet.Sample(uint64(len(hashes)))
}()

reqs := toGetRecords(hashes)

const ioParallelism = 16
for {
reqs := toGetRecords(hashes)

nbs.mu.Lock()
keeper := nbs.keeperFunc
if gcDepMode == gcDependencyMode_NoDependency {
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/go-sql-server-driver/auto_gc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ cluster:
}

err = driver.WithFile{
Name: "server.yaml",
Name: "server.yaml",
Contents: behaviorFragment + clusterFragment,
}.WriteAtDir(repo.Dir)
require.NoError(t, err)
Expand Down Expand Up @@ -183,7 +183,7 @@ cluster:
}

err = driver.WithFile{
Name: "server.yaml",
Name: "server.yaml",
Contents: behaviorFragment + clusterFragment,
}.WriteAtDir(repo.Dir)
require.NoError(t, err)
Expand Down

0 comments on commit 4ce49e6

Please sign in to comment.