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

CBG-3273: Fix revocation feed loop #6378

Merged
merged 2 commits into from
Aug 23, 2023
Merged

CBG-3273: Fix revocation feed loop #6378

merged 2 commits into from
Aug 23, 2023

Conversation

mohammed-madi
Copy link
Contributor

@mohammed-madi mohammed-madi commented Aug 23, 2023

CBG-3237

Describe your PR here...

  • The revocation feed loop can run infinitely if an iteration is skipped before lastSeq is reset to the last entry's sequence.
  • The solution is to assign lastSeq before iterations are skipped, in the inner for .. in changes loop and the outer loop
  • Added TestRevocationsWithQueryLimit2Channels which reproduces the loop and checks access to docs works as expected.

Pre-review checklist

  • Removed debug logging (fmt.Print, log.Print, ...)
  • Logging sensitive data? Make sure it's tagged (e.g. base.UD(docID), base.MD(dbName))
  • Updated relevant information in the API specifications (such as endpoint descriptions, schemas, ...) in docs/api

Dependencies (if applicable)

  • Link upstream PRs
  • Update Go module dependencies when merged

Integration Tests

@adamcfraser adamcfraser merged commit d1898fd into master Aug 23, 2023
26 checks passed
@adamcfraser adamcfraser deleted the CBG-3273 branch August 23, 2023 17:06
torcolvin pushed a commit that referenced this pull request Sep 18, 2023
* Add TestRevocationsWithQueryLimit2Channels and fix loop

* Move lastSeq assignment before inner loop
torcolvin pushed a commit that referenced this pull request Sep 18, 2023
* Add TestRevocationsWithQueryLimit2Channels and fix loop

* Move lastSeq assignment before inner loop
mohammed-madi added a commit that referenced this pull request Sep 19, 2023
* Add TestRevocationsWithQueryLimit2Channels and fix loop

* Move lastSeq assignment before inner loop

Co-authored-by: Mohammed Madi <[email protected]>
torcolvin added a commit that referenced this pull request Sep 20, 2023
* Add TestRevocationsWithQueryLimit2Channels and fix loop
* Move lastSeq assignment before inner loop

backport of #6378 / CBG-3273
backport ticket https://issues.couchbase.com/browse/CBG-3331

Co-authored-by: Mohammed Madi <[email protected]>
bbrks pushed a commit that referenced this pull request Mar 28, 2024
* Add TestRevocationsWithQueryLimit2Channels and fix loop

* Move lastSeq assignment before inner loop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants