Function: reserveRegionVersions()
Function: reserveRegionVersions()
Section titled “Function: reserveRegionVersions()”reserveRegionVersions(
options,count):Promise<{start:bigint;end:bigint; }>
Defined in: server/src/multi-region.ts:48
Allocate the next N region-local version numbers atomically. Used by the sync handler on every push to stamp change_log rows with a (region, local_version) pair — a scalar SQLite sequence still tracks a monotonic row_version within the region, and the causal cookie layer at the protocol boundary carries region → local_version.
v0.1 semantics: single-writer per region. Multi-writer within a
region requires either a global sequencer DO (see SequencerDO sketch
below) or a compare-and-swap driver adapter (out of scope).
Parameters
Section titled “Parameters”options
Section titled “options”RegionSequencerOptions
number
Returns
Section titled “Returns”Promise<{ start: bigint; end: bigint; }>