-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Cherry pick Choose log router tag prior to resolution in commit path for version vector. (#11628) #11635
base: release-7.3
Are you sure you want to change the base?
Cherry pick Choose log router tag prior to resolution in commit path for version vector. (#11628) #11635
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -813,6 +813,9 @@ struct LogPushData : NonCopyable { | |
// getAllMessages() and is used before writing any other mutations. | ||
void setMutations(uint32_t totalMutations, VectorRef<StringRef> mutations); | ||
|
||
Optional<Tag> savedRandomRouterTag; | ||
void storeRandomRouterTag() { savedRandomRouterTag = logSystem->getRandomRouterTag(); } | ||
|
||
private: | ||
Reference<ILogSystem> logSystem; | ||
std::vector<Tag> next_message_tags; | ||
|
@@ -834,13 +837,17 @@ struct LogPushData : NonCopyable { | |
// true on a successful write, and false if the location has already been | ||
// written. | ||
bool writeTransactionInfo(int location, uint32_t subseq); | ||
|
||
Tag chooseRouterTag() { | ||
return savedRandomRouterTag.present() ? savedRandomRouterTag.get() : logSystem->getRandomRouterTag(); | ||
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. I am noticing that this is resulting in an assertion failure in "TagPartitionedLogSystem::getRandomRouterTag()" -> "deterministicRandom()->randomInt()" when "logRouterTags = 0". 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. this appears to be because a pseudo tag is set. |
||
} | ||
}; | ||
|
||
template <class T> | ||
void LogPushData::writeTypedMessage(T const& item, bool metadataMessage, bool allLocations) { | ||
prev_tags.clear(); | ||
if (logSystem->hasRemoteLogs()) { | ||
prev_tags.push_back(logSystem->getRandomRouterTag()); | ||
prev_tags.push_back(chooseRouterTag()); | ||
} | ||
for (auto& tag : next_message_tags) { | ||
prev_tags.push_back(tag); | ||
|
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.
This needs to be called only log routers are present?
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.
do you have a simulation failure where you found this that I can use to test?
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.
Test: "tests/fast/Unreadable.toml -b on -s 598569344"
Or you can run a joshua job with version vector enabled and you would see failures caused by this.
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.
Actually the above test failure is on "main", I didn't run any tests over this change on this branch.