Replica commit hardening: Reconcile sends its diff as one tagged commit; straggler guard inside the lock; real-server and budget pins (#91)
Some checks failed
CultMesh QUIC native / Build win32-x64 (push) Has been skipped
CultMesh QUIC native / Build linux-x64 (push) Has been skipped
CultMesh QUIC native / Release native binaries (push) Has been skipped
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (push) Has been cancelled
CultMesh QUIC native / Verify committed binaries match SHA256SUMS (push) Has been cancelled
Some checks failed
CultMesh QUIC native / Build win32-x64 (push) Has been skipped
CultMesh QUIC native / Build linux-x64 (push) Has been skipped
CultMesh QUIC native / Release native binaries (push) Has been skipped
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (push) Has been cancelled
CultMesh QUIC native / Verify committed binaries match SHA256SUMS (push) Has been cancelled
This commit is contained in:
parent
7760219b7c
commit
abd1a92eb2
3 changed files with 214 additions and 7 deletions
|
|
@ -77,7 +77,20 @@ namespace GameCult.Networking
|
|||
{
|
||||
if (_disposed) return;
|
||||
foreach (var entry in _requests.ToArray())
|
||||
Reconcile(entry.Key, entry.Value);
|
||||
{
|
||||
// Reconcile can run after the cache has admitted a commit and before Watch has seen it, so its diff can carry
|
||||
// changed values; it is held and sent as one commit of its own, as Watch's is, for the replica to judge whole.
|
||||
var outbox = _outbox = new CommitOutbox(Guid.NewGuid().ToString("N"));
|
||||
try
|
||||
{
|
||||
Reconcile(entry.Key, entry.Value);
|
||||
}
|
||||
finally
|
||||
{
|
||||
_outbox = null;
|
||||
outbox.Send(entry.Key.Peer);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue