Repository navigation
Clarify the comments on retried transaction commits - #7822
Merged
Merged
Conversation
The comment on `last_api_commit` said "This is not any transaction up to `last_transaction_id`", which did not say what it meant. The test comments read like descriptions of a function's result. Now each test comment starts with "Checks that". Review of feldera/cloud#2135 found the same text there. Signed-off-by: Ben Pfaff <blp@feldera.com>
mihaibudiu
approved these changes
Nov 3, 2026
Comment on lines
+7476
to
7479
| /// retry of that request succeeds without doing anything. A request that | ||
| /// names another transaction up to `last_transaction_id` fails, because | ||
| /// that transaction can be an automatic or connector transaction, or one | ||
| /// that a restart lost. |
Contributor
There was a problem hiding this comment.
pitfall (medium): This doesn't match start_commit_transaction_from_api. The open API transaction is also "another transaction up to last_transaction_id", and a commit that names it succeeds. The stated reason is also incomplete: an older transaction that the API itself committed also fails, because only the most recent commit is remembered. The PR description says "another earlier transaction", but the comment doesn't. Suggested wording:
Suggested change
| /// retry of that request succeeds without doing anything. A request that | |
| /// names another transaction up to `last_transaction_id` fails, because | |
| /// that transaction can be an automatic or connector transaction, or one | |
| /// that a restart lost. | |
| /// retry of that request succeeds without doing anything. A request that | |
| /// names any other transaction, except the one that the API has open, | |
| /// fails. We can't accept every ID up to `last_transaction_id`, because | |
| /// that ID can belong to an automatic or connector transaction, or to one | |
| /// that a restart lost. |
Member
Author
Contributor
|
Only comments change here, so no gates apply: behaviour, tests, docs and dependencies are untouched.
|
The comment said that a commit of any other transaction up to `last_transaction_id` fails, but a commit of the open API transaction succeeds. It also did not say that a retry of an older API commit fails. Found in review. Signed-off-by: Ben Pfaff <blp@feldera.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Comments only, in
crates/connectors/src/controller.rs. Review of feldera/cloud#2135 found them unclear, and that PR copied them from #7687.TransactionInfo::last_api_commitlast_transaction_id" now says that a request that names another earlier transaction fails, and why.commit_transaction_id_testsNo code changes.