fix: disable read timeout for tx in db list (#7689)

Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com>
This commit is contained in:
Dan Cline
2024-04-17 11:46:03 -04:00
committed by GitHub
parent db4a4a34e4
commit 21ab76b89c

View File

@ -90,6 +90,8 @@ impl TableViewer<()> for ListTableViewer<'_> {
fn view<T: Table>(&self) -> Result<(), Self::Error> {
self.tool.provider_factory.db_ref().view(|tx| {
// Disable timeout because we are entering a TUI which might read for a long time
tx.inner.disable_timeout();
let table_db = tx.inner.open_db(Some(self.args.table.name())).wrap_err("Could not open db.")?;
let stats = tx.inner.db_stat(&table_db).wrap_err(format!("Could not find table: {}", stringify!($table)))?;
let total_entries = stats.entries();