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.
Browse files
Browse the repository at this point in the history
133060: kvserver/rangefeed: add event queue r=stevendanna a=wenyihu6 This patch adds a new data structure eventQueue which is a queue but uses a fixed size chunked linked list. Each chunk has a fixed size of 4096 elements. Chunks are pooled in a sync.Pool to reduce the number of allocations. pushBack, popFront, and len run in constant time, while drain runs in linear time with respect to the number of elements in the queue. This structure is not safe for concurrent use. This is for future commits to include the queue in the BufferedSender to buffer events at the node level. Part of: cockroachdb#129813 Release note: none Co-authored-by: Steven Danna <[email protected]> 133195: replica_rac2: inline Replica mutex assertions r=pav-kv,kvoli a=sumeerbhola These are now accomplished via the ReplicaMutexAsserter struct, instead of an interface. go build -gcflags "-m -m" produces output like: ``` ./processor.go:1142:46: inlining call to ReplicaMutexAsserter.RaftMuAssertHeld ./processor.go:1143:49: inlining call to ReplicaMutexAsserter.ReplicaMuAssertHeld ./processor.go:1142:46: inlining call to syncutil.(*Mutex).AssertHeld ./processor.go:1143:49: inlining call to syncutil.(*RWMutex).AssertHeld ``` Epic: CRDB-37515 Release note: None Co-authored-by: Wenyi Hu <[email protected]> Co-authored-by: sumeerbhola <[email protected]>
- Loading branch information
Showing
9 changed files
with
570 additions
and
116 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
Oops, something went wrong.