Skip to content

Commit

Permalink
s/ITXManager/ItxManager
Browse files Browse the repository at this point in the history
  • Loading branch information
aqrln committed Sep 25, 2024
1 parent e76b742 commit 829d5e8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions query-engine/core/src/executor/interpreting_executor.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use super::execute_operation::{execute_many_operations, execute_many_self_contained, execute_single_self_contained};
use super::request_context;
use crate::ITXManager;
use crate::ItxManager;
use crate::{
protocol::EngineProtocol, BatchDocumentTransaction, CoreError, Operation, QueryExecutor, ResponseData,
TransactionError, TransactionManager, TransactionOptions, TxId,
Expand All @@ -18,7 +18,7 @@ pub struct InterpretingExecutor<C> {
/// The loaded connector
connector: C,

itx_manager: ITXManager,
itx_manager: ItxManager,

/// Flag that forces individual operations to run in a transaction.
/// Does _not_ force batches to use transactions.
Expand All @@ -33,7 +33,7 @@ where
InterpretingExecutor {
connector,
force_transactions,
itx_manager: ITXManager::new(),
itx_manager: ItxManager::new(),
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions query-engine/core/src/interactive_transactions/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub static CLOSED_TX_CACHE_SIZE: Lazy<usize> = Lazy::new(|| match std::env::var(
Err(_) => 100,
});

pub struct ITXManager {
pub struct ItxManager {
/// Stores all current transactions (some of them might be already committed/expired/rolled back).
///
/// There are two tiers of locks here:
Expand Down Expand Up @@ -49,7 +49,7 @@ pub struct ITXManager {
timeout_sender: UnboundedSender<TxId>,
}

impl ITXManager {
impl ItxManager {
pub fn new() -> Self {
let transactions: Arc<RwLock<HashMap<TxId, Arc<RwLock<InteractiveTransaction>>>>> =
Arc::new(RwLock::new(HashMap::default()));
Expand All @@ -59,7 +59,7 @@ impl ITXManager {
// This task rollbacks and removes any open transactions with expired timeouts from the
// `self.transactions`. It also removes any closed transactions to avoid `self.transactions`
// growing infinitely in size over time.
// Note that this task automatically exits when all transactions finish and the `ITXManager`
// Note that this task automatically exits when all transactions finish and the `ItxManager`
// is dropped, because that causes the `timeout_receiver` to become closed.
crosstarget_utils::task::spawn({
let transactions = transactions.clone();
Expand Down

0 comments on commit 829d5e8

Please sign in to comment.