-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Version vector feature specific: Extend the check used (in a resolver actor) to detect empty messages #12416
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
base: main
Are you sure you want to change the base?
Conversation
empty messages in resolver code, so it works correctly in HA mode.
Result of foundationdb-pr-clang-ide on Linux RHEL 9
|
Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x
|
Result of foundationdb-pr-clang-arm on Linux CentOS 7
|
Result of foundationdb-pr-clang-ide on Linux RHEL 9
|
Result of foundationdb-pr-clang on Linux RHEL 9
|
Result of foundationdb-pr on Linux RHEL 9
|
Result of foundationdb-pr-macos on macOS Ventura 13.x
|
Result of foundationdb-pr-cluster-tests on Linux RHEL 9
|
Result of foundationdb-pr-clang-arm on Linux CentOS 7
|
Result of foundationdb-pr-clang on Linux RHEL 9
|
Result of foundationdb-pr-cluster-tests on Linux RHEL 9
|
Result of foundationdb-pr on Linux RHEL 9
|
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.
lgtm, one nit
fdbserver/Resolver.actor.cpp
Outdated
// Check if the given set of tags contain any tags other than the log router tags. | ||
// Used to check if a given "ResolveTransactionBatchRequest" corresponds to an | ||
// empty commit message or not. | ||
static bool hasNonLogRouterTags(std::set<Tag>& allTags) { |
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.
you can make allTags
const to signal intent
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.
Makes sense. Done now.
Result of foundationdb-pr-clang-ide on Linux RHEL 9
|
Result of foundationdb-pr-clang-arm on Linux CentOS 7
|
Result of foundationdb-pr-clang on Linux RHEL 9
|
Result of foundationdb-pr on Linux RHEL 9
|
Result of foundationdb-pr-cluster-tests on Linux RHEL 9
|
The "resolveBatch" actor (in Resolver.actor.cpp) checks if the "writtenTags" set in a "ResolveTransactionBatchRequest" is empty in order to detect whether the request corresponds to an empty commit message or not:
foundationdb/fdbserver/Resolver.actor.cpp
Line 489 in bfe0b4e
This check works in single DC mode, but not in HA mode. This is because log router tags get added to all messages in HA mode and so "writtenTags" is not going to be empty even for empty messages. This PR extends that code to ignore log router tags while doing that check. (NOTE: Not sure if we need to extend that check to ignore any other types of tags though; manual inspection of the tags of commit messages in simulation tests appears to suggest that ignoring log router tags is enough here.)
Joshua id (with version vector disabled):
Code-Reviewer Section
The general pull request guidelines can be found here.
Please check each of the following things and check all boxes before accepting a PR.
For Release-Branches
If this PR is made against a release-branch, please also check the following:
release-branch
ormain
if this is the youngest branch)