feat: Ability to reset subscriber upon out of band seek#662
feat: Ability to reset subscriber upon out of band seek#662tmdiep merged 9 commits intogoogleapis:masterfrom
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
RESETsignal from the server, by:Notes:
SinglePartitionSubscriber.onSubscriberResetreturns false for now.SinglePartitionSubscriber.onSubscriberReset. Omitted to keep the size of the PR down.CommitState.completehad to be refactored to just throw (and not abort) becauseCommitterImpl.waitUntilEmptyshould throw when there are excess commit responses, since the committer will shortly shut down.