Versioned document store with two sorted indexes per table.
Contract (checked by runDurableKvConformance):
insert writes only when id is absent and returns the new version, else undefined;
replace writes only when the stored version equals version and returns the new
version, else undefined (missing document or concurrent write);
remove deletes only when the stored version equals version;
range returns ids whose index score is <= max, ascending by score, at most limit.
It may return ids whose document changed since (callers re-read); it must not miss a
document whose committed score is <= max beyond limit.
Versioned document store with two sorted indexes per table.
Contract (checked by
runDurableKvConformance):insertwrites only whenidis absent and returns the new version, elseundefined;replacewrites only when the stored version equalsversionand returns the new version, elseundefined(missing document or concurrent write);removedeletes only when the stored version equalsversion;rangereturns ids whose index score is<= max, ascending by score, at mostlimit. It may return ids whose document changed since (callers re-read); it must not miss a document whose committed score is<= maxbeyondlimit.