WIP Core opt#5283
Draft
dmkozh wants to merge 7 commits into
Draft
Conversation
BUILD_TESTS builds unconditionally populate mLastLedgerTxMeta and force-enable tx meta so tests can inspect it, but since the apply-load benchmarks are built with BUILD_TESTS as well we need a way to unconditionally disable meta.
During ledger close, run addHotArchiveBatch, addLiveBatch and updateInMemorySorobanState concurrently. They modify independent data structures and so need no synchronization.
Replace the single global mutex + RandomEvictionCache with 16 sharded caches (each with its own mutex) so concurrent signature verification threads no longer block on a shared lock. Also use the single-lookup maybeGet() in place of the exists()/get() double-lookup.
Build the LiveBucketIndex on an async worker thread while the put loop in mergeInMemory runs on the main thread. Both only read mergedEntries as const, so they need no synchronization.
The delta is only consumed by checkOnOperationApply, which is a no-op when no invariants are registered.
This relaxes the TTL invariant check a bit, instead of checking that created TTL keys belong to the specific entries, we just ensure that the expected entry counts match. This should be a pretty reasonable tradeoff - it seems like it would be pretty hard to create a mismatched TTL entry (vs missing it entirely).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Resolves #X
Checklist
clang-formatv8.0.0 (viamake formator the Visual Studio extension)