Skip to content

fix: retry realm config admin writes after a commit conflict - #614

Merged
St4NNi merged 5 commits into
mainfrom
fix/realm-config-retry
Nov 14, 2026
Merged

St4NNi merged 5 commits into
mainfrom
fix/realm-config-retry

Conversation

@St4NNi

@St4NNi St4NNi commented Nov 14, 2026

Copy link
Copy Markdown
Member

Realm admin writes could fail with 409 when a background realm config write (for example document sync) committed first. #612 fixed this for the quota setting. This PR applies the same retry to the other admin writes that read and write the realm config.

  • On a commit conflict, the operation starts a new transaction and repeats its whole read, check and write step, at most three times. Other errors are returned unchanged.
  • Covers policies, email, identity provider, portal, compute, federation, node names and realm admins.
  • Data placement is unchanged: its route already re-runs the operation after a conflict.
  • The attempt limit lives once in the realm module and the quota setting uses it too.
  • Each covered operation has a test where the first commit loses and the retry rereads the newer config.
  • Workspace version 3.0.0-alpha.201.

Related: #612

@codecov

codecov Bot commented Nov 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.52751% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.53%. Comparing base (11e93d5) to head (b8a7d13).

Files with missing lines Patch % Lines
operations/src/realm/commit_retry.rs 95.23% 5 Missing ⚠️
operations/src/realm/set_admin.rs 75.00% 3 Missing ⚠️
operations/src/realm/set_compute.rs 90.47% 2 Missing ⚠️
operations/src/realm/set_email.rs 83.33% 2 Missing ⚠️
operations/src/realm/set_federation.rs 91.30% 2 Missing ⚠️
operations/src/realm/set_policies.rs 91.66% 2 Missing ⚠️
operations/src/realm/set_portal.rs 90.47% 2 Missing ⚠️
operations/src/realm/set_provider.rs 90.47% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #614      +/-   ##
==========================================
+ Coverage   89.52%   89.53%   +0.01%     
==========================================
  Files        1697     1698       +1     
  Lines      672909   673186     +277     
==========================================
+ Hits       602418   602751     +333     
+ Misses      70491    70435      -56     

☔ 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 792c24e into main Nov 14, 2026
31 checks passed
@St4NNi
St4NNi deleted the fix/realm-config-retry branch November 14, 2026 08:58

This branch was successfully deployed

1 active deployment
coverage — b8a7d139 Deployed Nov 14, 2026 by St4NNi via Generate Coverage Report #1221
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