Skip to content
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

fix: Properly clean up state when executing a command fails #6437

Merged

Conversation

AlanConfluent
Copy link
Member

Description

Attempts to cleanup and state associated with a command id when a transaction for that command fails to commit properly.

Fixes #6340

Testing done

Ran unit tests

Reviewer checklist

  • Ensure docs are updated if necessary. (eg. if a user visible feature is being added or changed).
  • Ensure relevant issues are linked (description should include text like "Fixes #")

@AlanConfluent AlanConfluent requested a review from a team as a code owner October 14, 2020 23:56
commandId,
(k, v) -> {
if (v == null) {
throw new IllegalStateException(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could actually call this before the command is registered right? If something throws between generating the command id and enqueueing?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's true, it is possible.

Ok, now I just log when something is being aborted, but throw no error either way.

Copy link
Contributor

@rodesai rodesai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AlanConfluent AlanConfluent merged commit 242a32e into confluentinc:master Oct 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ksqlDB does not clear command futures map if a command transaction fails to commit
2 participants