mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 01:07:18 +03:00
b203ccaade
* kvutils/ledger-on-sql: Avoid a race condition in dispatching. This changes the API of kvutils to allow for passing data out of the transaction, which makes it much easier to ensure the new head makes it to the dispatcher. Previously, we would use an `AtomicLong` to communicate the data, but this was problematic because values could arrive out in the wrong order. For example: - log index 5 is committed - `head` is updated to 6 - the dispatcher is signalled with a head of 6 - log index 6 is committed - log index 7 is committed - `head` is updated to 8 - `head` is updated to 7 - the dispatcher is signalled with a head of 7 In this scenario, we would have to wait until a new commit comes in before the indexer finds out about log index 7. * kvutils: Just return an `Either`from `SubmissionValidator`. It was either that or introduce yet another type to split `SubmissionValidated` into two. CHANGELOG_BEGIN CHANGELOG_END * kvutils: Make ValidationFailed extend NoStackTrace. |
||
---|---|---|
.. | ||
src | ||
BUILD.bazel |