SQLite engine: transactional seam — begin_tx, writer-slot lease, all eleven *_tx methods (task sqlite-engine-seam-tx)
This commit is contained in:
1 parent
7d400906f5
commit
c38033db1a
8 files changed
+1988
-20
No files matched your search
@@ -40,10 +40,10 @@
|
||||
//! ops (`fork-rederive-queue-ops`, register D-12) live in
|
||||
//! `queue_ops.rs` — owned contract-v1 code, not lineage body.
|
||||
//!
|
||||
//! Port state (wave 2): the machinery below is ported but not yet
|
||||
//! wired by the engine layer (wave 3 wires `open`, the trait impl, the
|
||||
//! seam). A subset of the ported surface is therefore unreachable
|
||||
//! until that wiring lands.
|
||||
//! Port state (wave 2): the machinery below is ported; wave 3 wires
|
||||
//! `open` and the trait/seam impl. A subset of the ported surface
|
||||
//! remains unreachable until the mechanism tasks wire it (the
|
||||
//! `#![allow(dead_code)]` posture stays until the last wiring task).
|
||||
|
||||
#![allow(dead_code)]
|
||||
#![allow(unused_imports)]
|
||||
@@ -53,8 +53,27 @@ mod queue_ops;
|
||||
mod schema;
|
||||
mod watcher;
|
||||
|
||||
pub(crate) use ops::{
|
||||
arg_i64, arg_opt_i64, attach_alkstore_functions, in_savepoint, lock_acquire, lock_release,
|
||||
lock_renew, stream_get_offset, stream_publish, stream_read_since, stream_save_offset,
|
||||
};
|
||||
pub(crate) use queue_ops::{
|
||||
FireOpts, Stamps, ack, ack_batch, cancel, claim_batch, enqueue, fail, get_job, heartbeat,
|
||||
queue_next_claim_at, retry, scheduler_register, scheduler_soonest, scheduler_tick,
|
||||
scheduler_unregister, sweep_expired,
|
||||
};
|
||||
pub(crate) use schema::{
|
||||
Error as SchemaError, Readers, Writer, apply_default_pragmas, attach_notify, bootstrap_schema,
|
||||
open_conn, open_conn_bootstrapped,
|
||||
};
|
||||
|
||||
/// Provision a fresh connection into the writer slot after a
|
||||
/// cancellation-path connection was consumed. Private helper over the
|
||||
/// substrate's bootstrapped open; the engine's tx handle captures it
|
||||
/// as its `reopen` closure's body.
|
||||
pub(crate) fn open_writer_connection(path: &str) -> Result<rusqlite::Connection, alkstore::Error> {
|
||||
open_conn_bootstrapped(path).map_err(|e| match e {
|
||||
SchemaError::Sqlite(inner) => alkstore::Error::database(inner),
|
||||
})
|
||||
}
|
||||
pub(crate) use watcher::{DEFAULT_WATCHER_POLL_INTERVAL, SharedUpdateWatcher, WatcherConfig};
|
||||
Reference in new issue
Block a user