When syncing from scratch or re-syncing, for the object types that are enabled to be stored in ES, always delete all objects from ES first on node startup.
Otherwise, if the es-objects-sync-db-on-startup startup option is true, for the object types that are enabled to be stored in ES and both no-delete and store-updates options are false, delete all objects from ES before loading from the object database.
For https://github.com/bitshares/bitshares-core/issues/2464#issuecomment-1006711212, follow-up of #2570.
es-objects-sync-db-on-startup
startup option istrue
, for the object types that are enabled to be stored in ES and bothno-delete
andstore-updates
options arefalse
, delete all objects from ES before loading from the object database.