Skip to content

Commit 97a0b53

Browse files
kodemartintomxey
andauthored
fix(indexer): Disable persist tx insertion order (#6926) (#6971)
# Description of change Disable persist tx insertion order because of bug #6668 To reenable some time after bug is fixed. ## Links to any relevant issues part of #6668 ## Type of change - Bug fix (a non-breaking change which fixes an issue) ## How the change has been tested clippy formatting `zen cargo nextest run -p iota-indexer --features pg_integration --test-threads 1` - [x] Basic tests (linting, compilation, formatting, unit/integration tests) - [ ] Patch-specific tests (correctness, functionality coverage) ### Release Notes - [x] Indexer: Disable insertion order indexing (will be revisited while enabling optimistic indexing) Co-authored-by: Tomasz Pastusiak <[email protected]>
1 parent 5bee254 commit 97a0b53

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

crates/iota-indexer/src/handlers/committer.rs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ use tokio_util::sync::CancellationToken;
1010
use tracing::{error, info, instrument};
1111

1212
use super::{CheckpointDataToCommit, EpochToCommit};
13-
use crate::{
14-
metrics::IndexerMetrics, models::transactions::TxInsertionOrder, store::IndexerStore,
15-
types::IndexerResult,
16-
};
13+
use crate::{metrics::IndexerMetrics, store::IndexerStore, types::IndexerResult};
1714

1815
pub(crate) const CHECKPOINT_COMMIT_BATCH_SIZE: usize = 100;
1916

@@ -123,13 +120,6 @@ async fn commit_checkpoints<S>(
123120

124121
let guard = metrics.checkpoint_db_commit_latency.start_timer();
125122
let tx_batch = tx_batch.into_iter().flatten().collect::<Vec<_>>();
126-
let tx_order_batch = tx_batch
127-
.iter()
128-
.map(|indexed_tx| TxInsertionOrder {
129-
insertion_order: -1, // fill with any value since it's ignored upon insert
130-
tx_digest: indexed_tx.tx_digest.into_inner().to_vec(),
131-
})
132-
.collect::<Vec<_>>();
133123
let tx_indices_batch = tx_indices_batch.into_iter().flatten().collect::<Vec<_>>();
134124
let events_batch = events_batch.into_iter().flatten().collect::<Vec<_>>();
135125
let event_indices_batch = event_indices_batch
@@ -148,7 +138,6 @@ async fn commit_checkpoints<S>(
148138
let _step_1_guard = metrics.checkpoint_db_commit_latency_step_1.start_timer();
149139
let mut persist_tasks = vec![
150140
state.persist_transactions(tx_batch),
151-
state.persist_tx_insertion_order(tx_order_batch),
152141
state.persist_tx_indices(tx_indices_batch),
153142
state.persist_events(events_batch),
154143
state.persist_event_indices(event_indices_batch),

crates/iota-indexer/tests/ingestion_tests.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ mod ingestion_tests {
226226
}
227227

228228
#[tokio::test]
229+
#[ignore = "https://github.com/iotaledger/iota/issues/6668"]
229230
pub async fn test_tx_insertion_order_table() -> Result<(), IndexerError> {
230231
let mut sim = Simulacrum::new();
231232
let data_ingestion_path = tempdir().unwrap().into_path();
@@ -267,6 +268,7 @@ mod ingestion_tests {
267268
}
268269

269270
#[tokio::test]
271+
#[ignore = "https://github.com/iotaledger/iota/issues/6668"]
270272
pub async fn test_tx_insertion_order_table_for_existing_digest() -> Result<(), IndexerError> {
271273
let mut sim = Simulacrum::new();
272274
let data_ingestion_path = tempdir().unwrap().into_path();

0 commit comments

Comments
 (0)