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-3817: fix incorrect runtime config after conflict error on collection update #6855

Merged
merged 6 commits into from
Jun 4, 2024

Conversation

gregns1
Copy link
Contributor

@gregns1 gregns1 commented May 31, 2024

CBG-3817

  • Remove the cas update for the update to runtime config at line 622 in admin_api.go. We should only update the cas on successful update of the config in the bucket which we do at line 648 in same file.
  • The issue with updating the runtime config but keeping the current cas before the successful operations at the bucket level (as we were before) is when we fail at the registry operation due to the collection conflict and attempt to rollback the runtime config, we get to line 1870 inside _applyConfig and don't force the reload as the (failed) runtime config has the same cas as the config fetched from the bucket, thus doesn't force the update in the runtime config on the server context

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

Integration Tests

rest/api_collections_test.go Outdated Show resolved Hide resolved
rest/api_collections_test.go Outdated Show resolved Hide resolved
rest/api_collections_test.go Outdated Show resolved Hide resolved
rest/api_collections_test.go Show resolved Hide resolved
@gregns1 gregns1 self-assigned this May 31, 2024
torcolvin
torcolvin previously approved these changes May 31, 2024
@torcolvin torcolvin enabled auto-merge (squash) May 31, 2024 16:10
@torcolvin torcolvin disabled auto-merge May 31, 2024 16:12
@gregns1 gregns1 assigned torcolvin and bbrks and unassigned gregns1 Jun 3, 2024
@torcolvin torcolvin merged commit 08f0b11 into main Jun 4, 2024
34 checks passed
@torcolvin torcolvin deleted the CBG-3817 branch June 4, 2024 13:22
gregns1 added a commit that referenced this pull request Jun 27, 2024
gregns1 added a commit that referenced this pull request Jul 1, 2024
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.

3 participants