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
feat: Ability to reset subscriber upon out of band seek #662
Conversation
...pubsublite/src/main/java/com/google/cloud/pubsublite/cloudpubsub/internal/AckSetTracker.java
Show resolved
Hide resolved
...ublite/src/main/java/com/google/cloud/pubsublite/cloudpubsub/internal/AckSetTrackerImpl.java
Outdated
Show resolved
Hide resolved
...ublite/src/main/java/com/google/cloud/pubsublite/cloudpubsub/internal/AckSetTrackerImpl.java
Show resolved
Hide resolved
...-cloud-pubsublite/src/main/java/com/google/cloud/pubsublite/internal/wire/CommitterImpl.java
Outdated
Show resolved
Hide resolved
...ud-pubsublite/src/main/java/com/google/cloud/pubsublite/internal/wire/NextOffsetTracker.java
Show resolved
Hide resolved
This leaves the client in an indeterminate state where it will drop a bunch of acks but not actually respect the seek on the reconnect. I don't think this is a good state to be in at head. Can you remove the changes to SubscriberImpl from this PR and move them to the next one, so at least if someone happens to (I don't think they will) pick up this intermediate state it will have the same behavior as the existing code (i.e. not reset?) |
Good point. Instead I just changed SinglePartitionSubscriber.onSubscriberReset to return false, which effectively becomes a no-op. This will keep the size of the next PR down and avoids re-reviewing many files. |
Prepares for handling the
RESET
signal from the server, by:Notes:
SinglePartitionSubscriber.onSubscriberReset
returns false for now.SinglePartitionSubscriber.onSubscriberReset
. Omitted to keep the size of the PR down.CommitState.complete
had to be refactored to just throw (and not abort) becauseCommitterImpl.waitUntilEmpty
should throw when there are excess commit responses, since the committer will shortly shut down.