GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||
GeezerVison is showing github.com — Prevent incomplete future and add more logs for ProducerIdManager by BewareMyPower · Pull Request #1391 · streamnative/kop
This repository was archived by the owner on Nov 16, 2026. It is now read-only.
Conversation
Contributor
MotivationCurrently, if the Lines 248 to 253 in f63b191
In addition, since Lines 304 to 309 in f63b191
ModificationsWhen the Then add some debug and error logs for DocumentationCheck the box below. Need to update docs?
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions### Motivation Currently, if the `ProducerIdManager` failed to generate the producer ID, the future of epoch and `TxnMetadata` would never complete, see https://github.com/streamnative/kop/blob/f63b191e72d2319f67f7a5ab7242e898c10ed9c5/kafka-impl/src/main/java/io/streamnative/pulsar/handlers/kop/coordinator/transaction/TransactionCoordinator.java#L248-L253 `epochAndTxnMetaFuture` would not complete in the case above. In addition, since `epochAndTxnMetaFuture` never complete exceptionally, the following code is redundant: https://github.com/streamnative/kop/blob/f63b191e72d2319f67f7a5ab7242e898c10ed9c5/kafka-impl/src/main/java/io/streamnative/pulsar/handlers/kop/coordinator/transaction/TransactionCoordinator.java#L304-L309 ### Modifications When the `ProducerIdManager` failed to generate the producer ID, complete `epochAndTxnMetaFuture` with null and handle the null value in the callback. Then add some debug and error logs for `ProducerIdManager`. Regarding the `exceptionally` block of `epochAndTxnMetaFuture`, treat it as an unexpected error caused by `thenAccept` block and return a `UNKNOWN_SERVER_ERROR` as well. Because in this case `Errors.forException(ex.getCause())` never return a valid error code.
Demogorgon314
approved these changes
Member
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. LGTM.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
BewareMyPower
added a commit
that referenced
this pull request
) ### Motivation Currently, if the `ProducerIdManager` failed to generate the producer ID, the future of epoch and `TxnMetadata` would never complete, see https://github.com/streamnative/kop/blob/f63b191e72d2319f67f7a5ab7242e898c10ed9c5/kafka-impl/src/main/java/io/streamnative/pulsar/handlers/kop/coordinator/transaction/TransactionCoordinator.java#L248-L253 `epochAndTxnMetaFuture` would not complete in the case above. In addition, since `epochAndTxnMetaFuture` never complete exceptionally, the following code is redundant: https://github.com/streamnative/kop/blob/f63b191e72d2319f67f7a5ab7242e898c10ed9c5/kafka-impl/src/main/java/io/streamnative/pulsar/handlers/kop/coordinator/transaction/TransactionCoordinator.java#L304-L309 ### Modifications When the `ProducerIdManager` failed to generate the producer ID, complete `epochAndTxnMetaFuture` with null and handle the null value in the callback. Then add some debug and error logs for `ProducerIdManager`. Regarding the `exceptionally` block of `epochAndTxnMetaFuture`, treat it as an unexpected error caused by `thenAccept` block and return a `UNKNOWN_SERVER_ERROR` as well. Because in this case `Errors.forException(ex.getCause())` never return a valid error code. (cherry picked from commit dc9d49a)
BewareMyPower
added a commit
that referenced
this pull request
) ### Motivation Currently, if the `ProducerIdManager` failed to generate the producer ID, the future of epoch and `TxnMetadata` would never complete, see https://github.com/streamnative/kop/blob/f63b191e72d2319f67f7a5ab7242e898c10ed9c5/kafka-impl/src/main/java/io/streamnative/pulsar/handlers/kop/coordinator/transaction/TransactionCoordinator.java#L248-L253 `epochAndTxnMetaFuture` would not complete in the case above. In addition, since `epochAndTxnMetaFuture` never complete exceptionally, the following code is redundant: https://github.com/streamnative/kop/blob/f63b191e72d2319f67f7a5ab7242e898c10ed9c5/kafka-impl/src/main/java/io/streamnative/pulsar/handlers/kop/coordinator/transaction/TransactionCoordinator.java#L304-L309 ### Modifications When the `ProducerIdManager` failed to generate the producer ID, complete `epochAndTxnMetaFuture` with null and handle the null value in the callback. Then add some debug and error logs for `ProducerIdManager`. Regarding the `exceptionally` block of `epochAndTxnMetaFuture`, treat it as an unexpected error caused by `thenAccept` block and return a `UNKNOWN_SERVER_ERROR` as well. Because in this case `Errors.forException(ex.getCause())` never return a valid error code. (cherry picked from commit dc9d49a)
BewareMyPower
added a commit
that referenced
this pull request
) ### Motivation Currently, if the `ProducerIdManager` failed to generate the producer ID, the future of epoch and `TxnMetadata` would never complete, see https://github.com/streamnative/kop/blob/f63b191e72d2319f67f7a5ab7242e898c10ed9c5/kafka-impl/src/main/java/io/streamnative/pulsar/handlers/kop/coordinator/transaction/TransactionCoordinator.java#L248-L253 `epochAndTxnMetaFuture` would not complete in the case above. In addition, since `epochAndTxnMetaFuture` never complete exceptionally, the following code is redundant: https://github.com/streamnative/kop/blob/f63b191e72d2319f67f7a5ab7242e898c10ed9c5/kafka-impl/src/main/java/io/streamnative/pulsar/handlers/kop/coordinator/transaction/TransactionCoordinator.java#L304-L309 ### Modifications When the `ProducerIdManager` failed to generate the producer ID, complete `epochAndTxnMetaFuture` with null and handle the null value in the callback. Then add some debug and error logs for `ProducerIdManager`. Regarding the `exceptionally` block of `epochAndTxnMetaFuture`, treat it as an unexpected error caused by `thenAccept` block and return a `UNKNOWN_SERVER_ERROR` as well. Because in this case `Errors.forException(ex.getCause())` never return a valid error code. (cherry picked from commit dc9d49a)
michaeljmarshall
pushed a commit
to michaeljmarshall/kop
that referenced
this pull request
…reamnative#1391) ### Motivation Currently, if the `ProducerIdManager` failed to generate the producer ID, the future of epoch and `TxnMetadata` would never complete, see https://github.com/streamnative/kop/blob/f63b191e72d2319f67f7a5ab7242e898c10ed9c5/kafka-impl/src/main/java/io/streamnative/pulsar/handlers/kop/coordinator/transaction/TransactionCoordinator.java#L248-L253 `epochAndTxnMetaFuture` would not complete in the case above. In addition, since `epochAndTxnMetaFuture` never complete exceptionally, the following code is redundant: https://github.com/streamnative/kop/blob/f63b191e72d2319f67f7a5ab7242e898c10ed9c5/kafka-impl/src/main/java/io/streamnative/pulsar/handlers/kop/coordinator/transaction/TransactionCoordinator.java#L304-L309 ### Modifications When the `ProducerIdManager` failed to generate the producer ID, complete `epochAndTxnMetaFuture` with null and handle the null value in the callback. Then add some debug and error logs for `ProducerIdManager`. Regarding the `exceptionally` block of `epochAndTxnMetaFuture`, treat it as an unexpected error caused by `thenAccept` block and return a `UNKNOWN_SERVER_ERROR` as well. Because in this case `Errors.forException(ex.getCause())` never return a valid error code. (cherry picked from commit dc9d49a)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Reviewers1 more reviewerUh oh!
There was an error while loading. Please reload this page. AssigneesLabels
cherry-picked/branch-2.8.3
cherry-picked/branch-2.9.3
cherry-picked/branch-2.10.1
no-need-doc
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. 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. | ||||||||||||||||||||||||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |