clockworklabs/SpacetimeDB · error · DBError
System table schema mismatch for table id {table_id}. Expect
Error message
System table schema mismatch for table id {table_id}. Expected: {schema:?}, found: {in_memory:?} What it means
Error "System table schema mismatch for table id {table_id}. Expected: {schema:?}, found: {in_memory:?}" thrown in clockworklabs/SpacetimeDB.
Source
Thrown at crates/datastore/src/locking_tx_datastore/committed_state.rs:413
for schema in system_tables() {
let table_id = schema.table_id;
let in_memory = self
.tables
.get(&table_id)
.ok_or(TableError::IdNotFoundState(table_id))?
.schema
.clone();
let mut in_st_tables = self.schema_for_table_raw(table_id)?;
// We normalize so that the orders will match when checking for equality.
in_st_tables.normalize();
let in_memory = {
let mut s = in_memory.as_ref().clone();
s.normalize();
s
};
if in_memory != in_st_tables {
return Err(anyhow!(
"System table schema mismatch for table id {table_id}. Expected: {schema:?}, found: {in_memory:?}"
)
.into());
}
}
Ok(())
}
/// Builds the in-memory state of sequences from `st_sequence` system table.
/// The tables store the lasted allocated value, which tells us where to start generating.
pub(super) fn build_sequence_state(&mut self) -> Result<SequencesState> {
let mut sequence_state = SequencesState::default();
let st_sequences = self.tables.get(&ST_SEQUENCE_ID).unwrap();
for row_ref in st_sequences.scan_rows(&self.blob_store) {
let sequence = StSequenceRow::try_from(row_ref)?;
let seq = Sequence::new(sequence.clone().into(), Some(sequence.allocated));
View on GitHub (pinned to 524b4487d9)
When it happens
Trigger: Thrown at crates/datastore/src/locking_tx_datastore/committed_state.rs:413 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of clockworklabs/SpacetimeDB@524b4487d9 (2026-08-16).
Data as JSON: /api/errors/243a2374907ab808.
Report an issue: GitHub.