-
Notifications
You must be signed in to change notification settings - Fork 140
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
Perf[MQB]: fix linear iteration over all queues on any replication #525
Merged
dorjesinpo
merged 13 commits into
bloomberg:main
from
678098:t2577_fix_queue_linear_iteration
Dec 3, 2024
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
0e2382d
Register queues for notifications
678098 3a2b28a
Remove d_hasNewMessages flag
678098 73c5912
Storage key lookup
678098 764c0a7
Better docs
678098 b31d995
Better docs
678098 b9f5335
Fix: handle replication notifications on domain reconfigure
678098 c0f8832
Fix: correctly set d_hasReceipts for FileBackedStorage on configure
678098 4fc5276
Fix: setConsistency returns void
678098 8c1790e
Refactor[MQB]: split dispatcherFlush into flushStorage, flushQueues
678098 0124dd3
Docs[MQB]: add a comment
678098 1949b2b
Remove cancelReplicationNotification
678098 f7be85e
Docs: fix docs
678098 7a4de87
Remove flushQueues
678098 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 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
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
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
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -203,7 +203,7 @@ class FileBackedStorage BSLS_KEYWORD_FINAL : public ReplicatedStorage { | |||||||||||||
bmqp::SchemaLearner::Context d_schemaLearnerContext; | ||||||||||||||
// Context for replicated data. | ||||||||||||||
|
||||||||||||||
const bool d_hasReceipts; | ||||||||||||||
bool d_hasReceipts; | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We set this flag once and didn't update it before. It is also used here for early return: blazingmq/src/groups/mqb/mqbs/mqbs_filebackedstorage.cpp Lines 216 to 221 in c0f8832
|
||||||||||||||
|
||||||||||||||
bmqt::MessageGUID d_currentlyAutoConfirming; | ||||||||||||||
// Message being evaluated and possibly auto confirmed. | ||||||||||||||
|
@@ -365,6 +365,11 @@ class FileBackedStorage BSLS_KEYWORD_FINAL : public ReplicatedStorage { | |||||||||||||
const bsls::Types::Int64 messageTtl, | ||||||||||||||
int maxDeliveryAttempts) BSLS_KEYWORD_OVERRIDE; | ||||||||||||||
|
||||||||||||||
/// Set the consistency level associated to this storage to the specified | ||||||||||||||
/// `value`. | ||||||||||||||
void | ||||||||||||||
setConsistency(const mqbconfm::Consistency& value) BSLS_KEYWORD_OVERRIDE; | ||||||||||||||
|
||||||||||||||
/// Return the resource capacity meter associated to this storage. | ||||||||||||||
virtual mqbu::CapacityMeter* capacityMeter() BSLS_KEYWORD_OVERRIDE; | ||||||||||||||
|
||||||||||||||
|
@@ -466,12 +471,9 @@ class FileBackedStorage BSLS_KEYWORD_FINAL : public ReplicatedStorage { | |||||||||||||
virtual mqbi::StorageResult::Enum | ||||||||||||||
removeAll(const mqbu::StorageKey& appKey) BSLS_KEYWORD_OVERRIDE; | ||||||||||||||
|
||||||||||||||
/// If the specified `storage` is `true`, flush any buffered replication | ||||||||||||||
/// messages to the peers. If the specified `queues` is `true`, `flush` | ||||||||||||||
/// all associated queues. Behavior is undefined unless this node is | ||||||||||||||
/// the primary for this partition. | ||||||||||||||
virtual void dispatcherFlush(bool storage, | ||||||||||||||
bool queues) BSLS_KEYWORD_OVERRIDE; | ||||||||||||||
/// Flush any buffered replication messages to the peers. Behaviour is | ||||||||||||||
/// undefined unless this cluster node is the primary for this partition. | ||||||||||||||
void flushStorage() BSLS_KEYWORD_OVERRIDE; | ||||||||||||||
|
||||||||||||||
/// Attempt to garbage-collect messages for which TTL has expired, and | ||||||||||||||
/// return the number of messages garbage-collected. Populate the | ||||||||||||||
|
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.
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.
@678098 should this comment from 685-687 be removed? Looks like
flushStorage()
docs don't need this bit anymoreThere 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.
Will clean this up