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(pubsublite): fix committer races #3810

merged 4 commits into from Mar 16, 2021


Copy link

@tmdiep tmdiep commented Mar 12, 2021


  1. When Stop is called before Terminate when there are outstanding acks, the committer did not transition to serviceTerminated. Terminate clears outstanding acks, so unsafeCheckDone needs to be called to check whether the committer can now shut down.
  2. If there is a pending commit, and Stop or Terminate are called just before the stream is connected, it can send a commit to the server before onStreamStatusChange performs the necessary state initialization for the streamConnected signal. So we add an enableCommits flag to ensure onStreamStatusChange processes the streamConnected signal first.

Simplified TestAssigningSubscriberIgnoreOutstandingAcks, which detected these races.

Fixes #3791.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants