Skip to content

Latest commit

 

History

History
13 lines (8 loc) · 1.22 KB

File metadata and controls

13 lines (8 loc) · 1.22 KB

Indexes

Async Index Migration (#7101)

TimestampIndex, SpentIndex, and AddressIndex have been migrated from synchronous to asynchronous operation, following the same pattern as TxIndex and other indexes using BaseIndex framework.

When enabling an index for the first time, the node will build the index in the background while remaining fully operational. Progress can be monitored via the getindexinfo RPC.

Existing nodes with indexes enabled will automatically migrate data from the old location (block index database) to new separate databases on first startup. This migration may take 20-40 minutes or longer depending on hardware specifications and index sizes. The node will log progress during migration.

Breaking changes:

  • SpentIndex and AddressIndex are incompatible with pruned nodes as they require access to undo data now
  • TimestampIndex can no longer be enabled on a datadir where pruning has already occurred. It still works when started together with -prune from a fresh sync or reindex (the index is built forward as blocks arrive), but enabling it on an existing pre-pruned datadir now fails at startup. The old synchronous implementation built forward from the current tip and accepted that case