Skip to content

[indexer]: Handle race conditions with new object-based dependency checksΒ #10250

@tomxey

Description

@tomxey

Previously dependency check was checking if global order of previous tx is already present in the global order table AND that it's status is NOT Started (so we checked if indexing for this tx is already fully finished)

Currently we are checking if transaction input objects are present in the DB (in other words, we check if objects created by parent transactions are already indexed), but that doesn't mean that parent transactions are indexed fully.
They still may have e.g. global order not assigned or they may still want to remove some objects or they may want to update the display table, etc.

this creates a race condition that may lead to failures like:

---- write_api::test_parallel_shared_object_updates stdout ----

thread 'write_api::test_parallel_shared_object_updates' (78126163) panicked at crates/iota-indexer/tests/rpc-tests/write_api.rs:656:25:
tx: TransactionDigest(CtCFeKVDVEgMqUseunL3qAA538Z8ZR2MVVGxqQfXPHka) should have bigger order than it's deps: {TransactionDigest(C1f4eFtw2R2octZa7y4o35Vb2UnL6R1gGQwCdfMHzEDW)}

Part of the issue could be solved by making sure global order is assigned in checkpoint indexing before changes to objects table are written.

To be investigated if this is enough to solve all the issues.

Metadata

Metadata

Assignees

Labels

infrastructureIssues related to the Infrastructure Team

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions