-
Notifications
You must be signed in to change notification settings - Fork 449
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
TrieStore to Channels #7845
base: master
Are you sure you want to change the base?
TrieStore to Channels #7845
Conversation
} | ||
}); | ||
} | ||
await foreach (var disposable in disposeQueue.Reader.ReadAllAsync()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will it correctly partition items from channel between 4 tasks/threads here?
writeBatch = _nodeStorage.StartWriteBatch(); | ||
} | ||
} | ||
|
||
tn.CallRecursively(DoPersist, address2, ref path, GetTrieStore(address2), true, _logger); | ||
disposeQueue.Add(writeBatch); | ||
await tn.CallRecursivelyAsync(DoPersist, address2, path, GetTrieStore(address2), true, _logger); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this can break anything... probably not
int previousLength = AppendChildPath(ref currentPath, i); | ||
await child.CallRecursivelyAsync(action, storageAddress, currentPath, resolver, skipPersisted, logger, maxPathLength, resolveStorageRoot); | ||
currentPath.TruncateMut(previousLength); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No point to mutate the path as we have to do the copy anyways?
Will wait on this as might be better way to do it with #7787 without introducing a second code path |
Changes
ConcurrentQueue
in aBlockingCollection
burns a ton of CPU spinning; whereas its a pattern ideally suited toChannel
s; and using trueasync
Types of changes
What types of changes does your code introduce?
Testing
Requires testing