fix: roll back rejected marker writes atomically

Issue: #442
User-Visible: yes
This commit is contained in:
Sergey Matyunin
2026-09-04 00:15:44 +03:00
parent 77ac72d15d
commit fcd4e3ddfe
36 changed files with 1138 additions and 462 deletions
+1 -2
View File
@@ -51,8 +51,7 @@ export function rollbackOptimistic<T>(
): boolean {
const current = host._serverCfg;
if (!current || host._cfgRev !== attempt.revision
|| (current !== attempt.attempted
&& fingerprint(current) !== attempt.attemptedFingerprint)) return false;
|| fingerprint(current) !== attempt.attemptedFingerprint) return false;
host._serverCfg = attempt.previous;
host._cfgContentFingerprint = attempt.previousFingerprint;
host.requestUpdate();