kv: check for 1-phase commit after request, not before#41104
kv: check for 1-phase commit after request, not before#41104craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
tbg
left a comment
There was a problem hiding this comment.
I stared at this a bunch but still not sure I got it right. The previous code counted 1PC attempts instead of successes? I know that DistSender will prevent 1PC when the epoch is not zero any more. Are you saying that without that behavior there's starvation? Shouldn't the 1PC attempt at the replica also lay down an intent if it doesn't go through?
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @andreimatei)
andreimatei
left a comment
There was a problem hiding this comment.
LGTM
Tobi, this PR is strictly for the 1PC metric. Before the patch, we'd count 1pc attempts, with the patch we count 1pc successes.
Nathan, it does appear that that commit message could be improved :P
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @andreimatei)
Found while verifying that cockroachdb#40518 didn't negatively impact YCSB performance. As it turns out, most txns that restart hit the check in DistSender instead, and that ends up being critical for forward progress. Without it, transactions appear to starve because they never write intents. The commit doesn't make any changes there, but it does fix an issue where 1PC transactions were being incorrectly detected. The detection was ignoring the fact that a 1PC attempt could be rejected by DistSender or a Replica. We now tie the metric to whether an EndTransaction actually evaluated as a 1PC txn instead of tying it to whether the EndTransaction _wanted_ to be evaluated as a 1PC txn. Release justification: low risk and improves metric reporting Release note: None
2dc1504 to
2dc5eb8
Compare
Ah yes, you're right. I guess I still had the experiment on my mind and didn't realize I had failed to mention what the PR was actually changing. Updated. |
|
bors r+ |
41098: roachtest/jepsen: don't fail test if retrieving invoke.log fails r=nvanbenschoten a=nvanbenschoten Fixes #41062. Release justification: Testing only. Release note: None 41104: kv: check for 1-phase commit after request, not before r=nvanbenschoten a=nvanbenschoten Found while verifying that #40518 didn't negatively impact YCSB performance. As it turns out, most txns that restart hit the check in DistSender instead, and that ends up being critical for forward progress. Without it, transactions appear to starve because they never write intents. The commit doesn't make any changes there, but it does fix an issue where 1PC transactions were being incorrectly detected. The detection was ignoring the fact that a 1PC attempt could be rejected by DistSender or a Replica. We now tie the metric to whether an EndTransaction actually evaluated as a 1PC txn instead of tying it to whether the EndTransaction _wanted_ to be evaluated as a 1PC txn. Release justification: low risk and improves metric reporting Release note: None 41127: Add myself to AUTHORS r=miretskiy a=miretskiy Authors += Myself Co-authored-by: Nathan VanBenschoten <nvanbenschoten@gmail.com> Co-authored-by: Yevgeniy Miretskiy <yevgeniy@cockroachlabs.com>
Build succeeded |
This was no longer true, as of cockroachdb#41104. Release note: None
This was no longer true, as of cockroachdb#41104. Release note: None
Found while verifying that #40518 didn't negatively impact YCSB performance.
As it turns out, most txns that restart hit the check in DistSender instead,
and that ends up being critical for forward progress. Without it, transactions
appear to starve because they never write intents.
The commit doesn't make any changes there, but it does fix an issue where
1PC transactions were being incorrectly detected. The detection was ignoring
the fact that a 1PC attempt could be rejected by DistSender or a Replica.
We now tie the metric to whether an EndTransaction actually evaluated as
a 1PC txn instead of tying it to whether the EndTransaction wanted to
be evaluated as a 1PC txn.
Release justification: low risk and improves metric reporting
Release note: None