mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-19 09:34:18 +01:00
core/storage: Allocate page1 lazily for MVCC transactions
This commit is contained in:
@@ -1944,6 +1944,8 @@ pub fn op_transaction(
|
||||
|
||||
if let Some(mv_store) = &mv_store {
|
||||
if state.mv_tx_id.is_none() {
|
||||
// We allocate the first page lazily in the first transaction.
|
||||
return_if_io!(pager.maybe_allocate_page1());
|
||||
let tx_id = mv_store.begin_tx();
|
||||
conn.mv_transactions.borrow_mut().push(tx_id);
|
||||
state.mv_tx_id = Some(tx_id);
|
||||
|
||||
Reference in New Issue
Block a user