-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Labels
infrastructureIssues related to the Infrastructure TeamIssues related to the Infrastructure Team
Description
Sometimes on CI the test fails with following error:
failures:
---- write_api::test_optimistic_tables_pruning stdout ----
thread 'tokio-runtime-worker' panicked at crates/iota-indexer/src/store/pg_indexer_store.rs:1720:9:
you are calling a blocking DB operation directly on an async thread. Please use IndexerReader::spawn_blocking instead to move the operation to a blocking thread
stack backtrace:
Which traces to the call to:
fn get_watermarks(&self) -> Result<(Vec<StoredWatermark>, i64), IndexerError> {
// read_only transaction, otherwise this will block and get blocked by write
// transactions to the same table.
run_query_with_retry!(
&self.blocking_cp,
|conn| {
...
},
PG_DB_COMMIT_SLEEP_DURATION
)
}But the function seems to be wrapped in a blocking task:
async fn get_watermarks(&self) -> Result<(Vec<StoredWatermark>, i64), IndexerError> {
self.execute_in_blocking_worker(move |this| this.get_watermarks())
.await
}To be investigated what is the exact cause.
Metadata
Metadata
Assignees
Labels
infrastructureIssues related to the Infrastructure TeamIssues related to the Infrastructure Team