AT_PLUS with KV mutation token versus REQUEST_PLUS for read-your-own-writes
0 reputation · 13 Jul 2024, 06:54 UTC
Goal: use the mutation token returned by a Couchbase key-value write as the AT_PLUS vector for an immediately following N1QL SELECT, achieving read-your-own-writes without forcing every indexer to catch up as REQUEST_PLUS does.
Constraint: AT_PLUS accepts a client-supplied consistent vector timestamp to bound staleness, while REQUEST_PLUS waits for global index convergence. Available documentation does not establish whether a KV mutation token maps directly to a N1QL AT_PLUS vector for global secondary indexes, or whether index partition lag can still return stale rows despite a valid token.
Assumption: Couchbase Server self-managed; Capella behavior may differ and requires confirmation against the target platform version.
Questions:
- Can a KV mutation token be supplied to AT_PLUS for a N1QL SELECT on the same document?
- Does AT_PLUS guarantee the write is visible if the responsible indexer has not yet processed the mutation?
- Is this behavior identical across Couchbase Server self-managed and Capella?