-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Add option for merging cluster updates #3941
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
Merged
Merged
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
431a634
Add option for coalescing cluster updates
8e20204
Address review
c6dbc7d
Address more review comments
9e3288e
Fix docs
add79b2
Preserve order when merging updates
29f1d3d
Address @htuch's review
0dd31c4
Skip immediate apply if there's an active timer
0bd58e6
Fix a few more issues pointed out by @htuch
67adb12
Improve existing test
ec643f1
Move EXPECT_CALL() to the top for clarity
d05ef99
More tests
95e5260
Cleanup tests
0f70fb3
Improve naming
b392c7b
Erase cluster from updates_map_ from removeCluster()
a399949
Drop merging adds/removals
f88c297
Fix memory leak
a1145dd
Make 2 local vars const.
b33b080
More constness, remove newline & spelling.
d70809c
Simplify use of shared_ptrs/refs/weak ptrs
10d3670
More review comments
80e03db
version history: sort & reflow cols
dcd7174
Collapse the number of map lookups
b3745de
Unconditionally remove cluster from updates map
6fac84f
Reorder members of PendingUpdates
9eae09a
Add TODO for extending Event::Timer's interface
0d8475f
Make const empty vectors static
4d0c528
Assert we are not enabling an already enabled timer
09d56cc
More counters
3d78234
Explain a possible race condition
6408528
Simplify branching
31e4fdf
Increment counter if merging is enabled
a5a5391
Counter renames + more tests
2a264d1
Remove trailing newline
25faa2b
Fix format
5affa4c
Fix spelling
d3464d4
Rename offwindow → out_of_merge_window
bbbfef8
Add comment to explain why we keeping some stats
d81fb7f
Document new cluster stats
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.
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.
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.
Question: if, for a given cluster/priority, we have something like "add, remove, inplace update, add, remove, inplace update", should we be canceling the outstanding deferred update at the second "add"?
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.
Correct, because the second "add" is a non-mergeable update so it will trigger immediate delivery, thus cancelling the pending merged update by disabling the timer.
This happens here in
scheduleUpdate():And we exercise a similar variation of this at the end at the unit test (inplace/inplace/inplace/remove→ timer disabled and updates delivered immediately).