forked from cockroachdb/cockroach
-
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.
kv: access HLC clock once per Replica tick
This is a small refactor that eliminates a call to `HLC.Now` on each replica tick. Due to the issue fixed by the following commit, we were ticking 1000s of uninitialized replicas in fast succession and as a result, these clock accesses were a major source of mutex contention. We shouldn't be ticking uninitialized replicas, but since we now know that this is an expensive part of Replica.tick, we might as well make it cheaper.
- Loading branch information
1 parent
aabce20
commit 376f550
Showing
4 changed files
with
13 additions
and
7 deletions.
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
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