clockworklabs/SpacetimeDB · error

datastore_table_scan_bsatn() call failed

Error message

datastore_table_scan_bsatn() call failed

What it means

Error "datastore_table_scan_bsatn() call failed" thrown in clockworklabs/SpacetimeDB.

Source

Thrown at crates/bindings/src/table.rs:42

    /// Returns the number of rows in this table.
    ///
    /// This reads datastore metadata, so it runs in constant time.
    /// It also takes into account modifications by the current transaction.
    fn count(&self) -> u64 {
        count::<Self>()
    }

    /// Iterate over all rows of the table.
    ///
    /// For large tables, this can be a slow operation!
    /// Prefer [filtering](RangedIndex::filter) a [`RangedIndex`] or [finding](UniqueColumn::find) a [`UniqueColumn`] if
    /// possible.
    ///
    /// (This keeps track of changes made to the table since the start of this reducer invocation. For example, if rows have been deleted since the start of this reducer invocation, those rows will not be returned by `iter`. Similarly, inserted rows WILL be returned.)
    #[inline]
    fn iter(&self) -> impl Iterator<Item = Self::Row> {
        let table_id = Self::table_id();
        let iter = sys::datastore_table_scan_bsatn(table_id).expect("datastore_table_scan_bsatn() call failed");
        TableIter::new(iter)
    }

    /// Inserts `row` into the table.
    ///
    /// The return value is the inserted row, with any auto-incrementing columns replaced with computed values.
    /// The `insert` method always returns the inserted row,
    /// even when the table contains no auto-incrementing columns.
    ///
    /// (The returned row is a copy of the row in the database.
    /// Modifying this copy does not directly modify the database.
    /// See [`UniqueColumn::update`] if you want to update the row.)
    ///
    /// May panic if inserting the row violates any constraints.
    /// Callers which intend to handle constraint violation errors should instead use [`Self::try_insert`].
    ///
    /// Inserting an exact duplicate of a row already present in the table is a no-op,
    /// as SpacetimeDB is a set-semantic database.

View on GitHub (pinned to 524b4487d9)

When it happens

Trigger: Thrown at crates/bindings/src/table.rs:42 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/3d2a6e0031800307. Report an issue: GitHub.