-
Notifications
You must be signed in to change notification settings - Fork 24
Description
Problem statement
Indexers with high performance create tons of receipts and have multiple allocations. We need to speed up start-up by parallelizing the SenderAllocation creation and also look at indexes in our database that may be affecting the initialization.
This can be done by spawning tasks for the initialization for SenderAccounts and SenderAllocations.
The code is currently sync:
indexer-rs/tap-agent/src/agent/sender_accounts_manager.rs
Lines 149 to 152 in 6f24558
state.sender_ids.insert(sender_id); state .create_or_deny_sender(myself.get_cell(), sender_id, allocation_ids) .await; indexer-rs/tap-agent/src/agent/sender_account.rs
Lines 487 to 490 in 6f24558
// Create a sender allocation for each allocation state .create_sender_allocation(myself.clone(), *allocation_id) .await?;
This is just a suggestion. If you find any other performance improvement opportunity, feel free to add to the PR as well.
There are indexers that have around 600 allocations open. It would be good to have a benchmark for this.
Also we need to create some indexes for ravs