Skip to content

fix: retry the realm quota write after a commit conflict - #612

Merged
St4NNi merged 7 commits into
mainfrom
fix/quota-test-conflict
Nov 13, 2026
Merged

St4NNi merged 7 commits into
mainfrom
fix/quota-test-conflict

Conversation

@St4NNi

@St4NNi St4NNi commented Nov 13, 2026

Copy link
Copy Markdown
Member

Setting the realm quota could answer 409 although nobody else changed the quota. The write reads the realm configuration and commits it in one optimistic transaction, and routine background writes to the same document (document sync, placement transitions, node onboarding) made that commit conflict. This also made replication::quota_surfaces_failure fail in CI now and then.

  • A quota write whose commit conflicts starts again in a new transaction, rereads the configuration and applies the quota again, up to three attempts. It still answers 409 after the last one.
  • Workspace version 3.0.0-alpha.198.

Depends on #611 (stacked on its branch for the version order).

@codecov

codecov Bot commented Nov 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.03546% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.51%. Comparing base (8380c44) to head (8ddbc23).

Files with missing lines Patch % Lines
operations/src/groups/imports/create.rs 90.51% 11 Missing ⚠️
operations/src/realm/set_quota.rs 97.95% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #612      +/-   ##
==========================================
- Coverage   89.52%   89.51%   -0.01%     
==========================================
  Files        1689     1689              
  Lines      669975   670174     +199     
==========================================
+ Hits       599814   599926     +112     
- Misses      70161    70248      +87     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@St4NNi
St4NNi merged commit 89ab890 into main Nov 13, 2026
29 checks passed
@St4NNi
St4NNi deleted the fix/quota-test-conflict branch November 13, 2026 19:43

This branch was successfully deployed

1 active deployment
coverage — 8ddbc233 Deployed Nov 13, 2026 by St4NNi via Generate Coverage Report #1214
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.

1 participant