mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-03 00:14:21 +01:00
mvcc: revert connection schema changes in mv rollback
This commit is contained in:
@@ -1357,6 +1357,13 @@ impl<Clock: LogicalClock> MvStore<Clock> {
|
||||
}
|
||||
}
|
||||
|
||||
if connection.schema.borrow().schema_version
|
||||
> connection.db.schema.lock().unwrap().schema_version
|
||||
{
|
||||
// Connection made schema changes during tx and rolled back -> revert connection-local schema.
|
||||
connection.schema.replace(connection.db.clone_schema()?);
|
||||
}
|
||||
|
||||
let tx = tx_unlocked.value();
|
||||
tx.state.store(TransactionState::Terminated);
|
||||
tracing::trace!("terminate(tx_id={})", tx_id);
|
||||
|
||||
Reference in New Issue
Block a user