Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
weird leaf index
Browse files Browse the repository at this point in the history
AlCutter committed Jul 12, 2024
1 parent 4856d58 commit 2ba5b7b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions storage/integrate.go
Original file line number Diff line number Diff line change
@@ -249,6 +249,7 @@ func (r *tileReadCache) set(tileLevel, tileIndex, treeSize uint64, t *fullTile)
//
// Note that by itself, this cache does not update any persisted state.
type tileWriteCache struct {
sync.Mutex
m map[compact.NodeID]*fullTile
err []error

@@ -276,6 +277,8 @@ func (tc *tileWriteCache) Err() error {
// update it by setting the node corresponding to id to the value hash.
func (tc *tileWriteCache) Visitor(ctx context.Context) compact.VisitFn {
return func(id compact.NodeID, hash []byte) {
tc.Lock()
defer tc.Unlock()
//klog.V(3).Infof("VISIT %v", id)
tileLevel, tileIndex, nodeLevel, nodeIndex := layout.NodeCoordsToTileAddress(uint64(id.Level), uint64(id.Index))
tileKey := compact.NodeID{Level: uint(tileLevel), Index: tileIndex}

0 comments on commit 2ba5b7b

Please sign in to comment.