Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditionally allocate WaitGroup memory #2901

Merged
merged 22 commits into from
Apr 2, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
comment
  • Loading branch information
StephenButtolph committed Apr 1, 2024
commit a018121e10034ff6eebdea5e6df2493f47bf323c
3 changes: 3 additions & 0 deletions x/merkledb/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,9 @@ func (v *view) hashChangedNode(n *node) ids.ID {
childBuffer = make([]byte, 1)
dualIndex = dualBitIndex(v.tokenSize)
bytesForKey = bytesNeeded(n.key.length)
// We track the last byte used by the key so that we can reset the
// value. for each key. This is needed because the child buffer may get
// ORed with this byte.
lastKeyByte byte

// We use [wg] to wait until all descendants of [n] have been updated.
Expand Down