tursodatabase/turso · error
MVCC logical pull revision is from the future…
Error message
MVCC logical pull revision is from the future: client_offset={} server_offset={} What it means
For an MVCC logical pull, the server parses the client revision (format g1:oOFFSET), clamps legacy values to the snapshot end offset, and then rejects any client offset greater than the server's current logical-log end offset. The client claims a position in the log that this server has never written, so no delta can be served.
Solutions
- Re-bootstrap the client with a full page snapshot pull so its revision resets to the server's current position
- Persist the server's database and .db-log across restarts so offsets stay monotonic
- Point the client back at the server instance it actually synced from
Example fix
// before: keep stale client revision after server reset
client.pull_updates(); // -> revision is from the future
// after: detect and re-bootstrap
if pull_failed_with_future_revision {
client.reset_state();
client.bootstrap_full_snapshot().await?;
} Defensive patterns
Strategy: fallback
Try / catch
match pull_logical(client_revision).await {
Ok(resp) => resp,
Err(e) if e.to_string().contains("revision is from the future") => {
bootstrap_full_snapshot().await?; // reset client revision via page pull
pull_logical(None).await // then resume logical pulls
}
Err(e) => return Err(e),
} Prevention
- Persist the server's db and .db-log across restarts so offsets stay monotonic
- Treat server database recreation as a signal to re-bootstrap all clients
- Never copy sync state between environments or server instances
When it happens
Trigger: Client synced from a different server (or an earlier incarnation of this server whose .db-log was longer) and presents a higher offset; the server's database or .db-log was recreated/truncated while client sync state was preserved.
Common situations: Test harness restarts the sync server with fresh db/.db-log files but keeps client sync state; pointing an already-synced client at a newly rebuilt server; copying client state between environments.
Related errors
- MVCC logical pull is not supported for in-memory sync…
- MVCC logical pull offset is not a transaction boundary
- buffer too short for u32 at offset
- buffer too short for u64 at offset
- invalid MVCC logical log frame end magic at offset
AI-assisted analysis of tursodatabase/turso@492c4a71cd (2026-08-20).
Data as JSON: /api/errors/1bc0cd0fe8aecc9e.
Report an issue: GitHub.
Appendix: source
Thrown at cli/sync_server.rs:810
Ok(snapshot) => snapshot,
Err(err) if is_nonportable_mvcc_log_error(&err) => {
info!(
"logical pull requested but MVCC log is not portable; returning replace-base pages: {err}"
);
return self.handle_logical_fallback(
db,
req,
fallback_revision,
&legacy_current_revision,
db_size,
);
}
Err(err) => return Err(err),
};
let start_offset = parse_mvcc_revision_offset(&req.client_revision, snapshot.end_offset)?;
if start_offset > snapshot.end_offset {
return Err(anyhow!(
"MVCC logical pull revision is from the future: client_offset={} server_offset={}",
start_offset,
snapshot.end_offset
));
}
let start = usize::try_from(start_offset)
.map_err(|_| anyhow!("MVCC logical pull start offset overflows usize"))?;
let end = usize::try_from(snapshot.end_offset)
.map_err(|_| anyhow!("MVCC logical pull end offset overflows usize"))?;
let mut response_body = Vec::new();
let (mvcc_log, body) = if start == end {
(None, Vec::new())
} else {
let crc_seed = if start_offset == 0 {
None
} else {
let seed = snapshot.crc_seed_at(start_offset)?;
Some(seed.to_le_bytes().to_vec())View on GitHub (pinned to 492c4a71cd)