forked from MystenLabs/sui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[consensus_handler] Local in-memory cache for processed transactions (M…
…ystenLabs#9363) We noticed that DB read into consensus_message_processed table takes significant time, and using simple in-memory cache would speed this up for duplicate transactions. The cache is implemented in ConsensusHandler and not on the PerEpochStore. The drawback is that other use cases would not make use of that cache, but on the flip side the benefit is that it optimizes for consensus handler performance: * It avoids lock conflicts between consensus handler and other threads. Even more, if/when we change handle_consensus_transaction to non-async, we could only acquire lock once for entire consensus handler task duration * I think down the line we are likely to optimize this even more and make this in memory cache even more specialized to skip deserialization for the duplicated transaction.
- Loading branch information
Showing
2 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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