Odin: say what a refused put promises
An acknowledged put is always on disk. A put refused because its write failed may still become durable and be served: it stays in the working set, and the next write lands it, or the failed write had already replaced the file. Puts are latest-value per type and key, so that is sound; the promise is written down at accept_raw_document. Soul finding 3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
749c6b9bbe
commit
dcd36fccb9
1 changed files with 8 additions and 0 deletions
|
|
@ -318,6 +318,14 @@ impl RuntimeState {
|
||||||
/// once the store holding the put is on disk. The write is the one `flush`,
|
/// once the store holding the put is on disk. The write is the one `flush`,
|
||||||
/// so it carries everything else that changed too. A write that fails
|
/// so it carries everything else that changed too. A write that fails
|
||||||
/// refuses the put.
|
/// refuses the put.
|
||||||
|
///
|
||||||
|
/// The promise runs one way only. An acknowledged put is always on disk. One
|
||||||
|
/// refused because its write failed may still be: it stays in the working set, so the catalog
|
||||||
|
/// serves it and the next write lands it (or the failed write had already
|
||||||
|
/// replaced the file). That is sound because a put is the latest value for
|
||||||
|
/// its type and key, not an event: a publisher that retries a refused put
|
||||||
|
/// stores the same value, and one that does not has lost nothing it was
|
||||||
|
/// promised.
|
||||||
fn accept_raw_document(&mut self, receipt: CultMeshRudpRawDocumentReceipt) -> Result<()> {
|
fn accept_raw_document(&mut self, receipt: CultMeshRudpRawDocumentReceipt) -> Result<()> {
|
||||||
ensure!(
|
ensure!(
|
||||||
self.activated(),
|
self.activated(),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue