-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: make state transitions uncancelable
Ensures updates to `KafkaConsumerActor`'s internal state are applied together with the side-effects that support those updates by executing both together inside an uncancelable block. These changes ensure that changes made to the consumer are reflected in the internal state, and changes to the internal state are made visible to clients. In the simplest cases, a sequence of `Ref.update`/`modify` and `Async.flatMap` was refactored to use `Ref.flatModify`, which offers the desired guarantees. In other cases, the relevant actions were explicitly wrapped in an `Async.uncancelable` block. Where relevant, logging of state changes was treated as part of the uncancelable block. This is to avoid silent state changes, which may be hard to track down while debugging. Invocation of user-supplied callbacks on changes to assigned partitions is left out of these blocks as failures in those do not affect the internal state of the consumer.
- Loading branch information
Showing
2 changed files
with
104 additions
and
98 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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