Explicitly allow writeVersion to be non-decreasing
Some checks failed
Tests / Clang total: 1162, passed: 1162
Clang |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |0|0|0|0|:clap:
Tests / SIMD fallback total: 1162, passed: 1162
Tests / Release [gcc] total: 1162, passed: 1162
GNU C Compiler (gcc) |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |0|0|0|0|:clap:
Tests / Release [gcc,aarch64] total: 868, passed: 868
Tests / Coverage total: 872, passed: 872
weaselab/conflict-set/pipeline/head There was a failure building this commit

Instead of strictly increasing.
This commit is contained in:
2024-04-22 14:15:44 -07:00
parent ea76e04cda
commit aa5dbb2887
2 changed files with 10 additions and 10 deletions

View File

@@ -71,12 +71,12 @@ struct __attribute__((__visibility__("default"))) ConflictSet {
/** `writes` must be sorted ascending, and must not have adjacent or
* overlapping ranges. Reads intersecting writes where readVersion <
* `writeVersion` will result in `Conflict` (or `TooOld`, eventually).
* `writeVersion` must be greater than every write version in all previous
* calls to `addWrites` */
* `writeVersion` must be greater than or equal to all previous write
* versions. */
void addWrites(const WriteRange *writes, int count, int64_t writeVersion);
/** Reads where readVersion < oldestVersion will result in `TooOld`. Must be
* greater than any previous oldestVersion */
* greater than or equal to all previous oldest versions. */
void setOldestVersion(int64_t oldestVersion);
/** Reads where readVersion < oldestVersion will result in `TooOld`. There are
@@ -160,14 +160,14 @@ void ConflictSet_check(const ConflictSet *cs,
/** `writes` must be sorted ascending, and must not have adjacent or
* overlapping ranges. Reads intersecting writes where readVersion <
* `writeVersion` will result in `Conflict` (or `TooOld`, eventually).
* `writeVersion` must be greater than all write versions in all previous
* calls to `addWrites` */
* `writeVersion` must be greater than or equal to all previous write versions.
*/
void ConflictSet_addWrites(ConflictSet *cs,
const ConflictSet_WriteRange *writes, int count,
int64_t writeVersion);
/** Reads where readVersion < oldestVersion will result in `TooOld`. Must be
* greater than any previous oldestVersion */
* greater than or equal to all previous oldest versions. */
void ConflictSet_setOldestVersion(ConflictSet *cs, int64_t oldestVersion);
/** Reads where readVersion < oldestVersion will result in `TooOld`. There are