-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Describe the feature
ReadTransactions
should be cloned into the TxnManager::start_message_listener
.
reth/crates/storage/libmdbx-rs/src/txn_manager.rs
Lines 55 to 56 in ce28fe3
#[cfg(feature = "read-tx-timeouts")] | |
let read_transactions = self.read_transactions.clone(); |
Currently it's not unless ReadTransactions
is set before calling TxnManager::start_message_listener
since it is wrapped in Option<Arc<_>>
, not in Arc<Option<_>>
.
reth/crates/storage/libmdbx-rs/src/txn_manager.rs
Lines 30 to 31 in ce28fe3
#[cfg(feature = "read-tx-timeouts")] | |
read_transactions: Option<std::sync::Arc<read_transactions::ReadTransactions>>, |
This is not the case, ReadTransactions
is set after calling TxnManager::start_message_listener
.
reth/crates/storage/libmdbx-rs/src/environment.rs
Lines 708 to 715 in ce28fe3
let mut txn_manager = TxnManager::new(EnvPtr(env)); | |
if let crate::MaxReadTransactionDuration::Set(duration) = self | |
.max_read_transaction_duration | |
.unwrap_or(read_transactions::MaxReadTransactionDuration::Set( | |
DEFAULT_MAX_READ_TRANSACTION_DURATION, | |
)) | |
{ | |
txn_manager = txn_manager.with_max_read_transaction_duration(duration); |
reth/crates/storage/libmdbx-rs/src/txn_manager.rs
Lines 35 to 46 in ce28fe3
pub(crate) fn new(env: EnvPtr) -> Self { | |
let (tx, rx) = sync_channel(0); | |
let txn_manager = Self { | |
sender: tx, | |
#[cfg(feature = "read-tx-timeouts")] | |
read_transactions: None, | |
}; | |
txn_manager.start_message_listener(env, rx); | |
txn_manager | |
} |
Additional context
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status