go
go copied to clipboard
exp/lighthorizon/index/cmd/single: allow 'continue' from latest indexed ledger
What problem does your feature solve?
efficient restart of index single
cmd as-service to start indexing from greatest ledger indexed + 1
, currently the single
cmd requires a start
parameter which works ok if a person is manually starting the indexer, but if deployed as service, need a way to dynamically calculate an effective start, but indicating to do so with a new continue
flag.
What would you like to see?
pass --continue
as parameter to the single
command, but allow it to be overridden bystart
if it is present. If there is no prior 'last ledger indexed' available from the index store, then 'continue' should default to start from genesis, 2. This will require updating the index to store this 'last ledger' info somewhere, design tbd.
What alternatives are there?
manually set 'start' to something and leave it there, any indexer as-service restart will trigger it to re-index from this static start point each time.