CultNetDatabase.Dispose publishes what a writer logged and had not yet published
The dispose test showed journal-first alone still lost the change: Dispose won the race against the writer's publication and cleared the stash. Dispose now drains the stash through the publisher after the journal is disposed (so nothing is stashed afterwards) and before the subject completes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
557e70fd03
commit
79f144d9ec
2 changed files with 18 additions and 3 deletions
|
|
@ -1022,8 +1022,8 @@ namespace GameCult.Networking.Tests
|
|||
Assert.That(logger.Errors, Is.Empty);
|
||||
}
|
||||
|
||||
// The journal is disposed before the observer: an admission the journal logs while the database is being disposed is
|
||||
// still published, never logged and then dropped.
|
||||
// A change the log holds is published, however Dispose interleaves with the write: Dispose waits for a journal in
|
||||
// flight (disposing the journal first) and publishes whatever the writer had logged and not yet published.
|
||||
[Test]
|
||||
public async Task ADatabaseDisposedWhileAWriteIsInItsLogAppendStillPublishesWhatItLogged()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue