--snap.stop: to prevent indexing on stage_header #4335

This commit is contained in:
Alex Sharov 2022-06-02 19:06:03 +07:00 committed by GitHub
parent 0d2f77ad2a
commit ea9e547be5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1140,7 +1140,7 @@ func DownloadAndIndexSnapshotsIfNeed(s *StageState, ctx context.Context, tx kv.R
log.Info("[Snapshots] Stat", "blocks", cfg.snapshots.BlocksAvailable(), "alloc", libcommon.ByteCount(m.Alloc), "sys", libcommon.ByteCount(m.Sys))
// Create .idx files
if cfg.snapshots.IndicesMax() < cfg.snapshots.SegmentsMax() {
if cfg.snapshots.Cfg().Produce && cfg.snapshots.IndicesMax() < cfg.snapshots.SegmentsMax() {
if !cfg.snapshots.SegmentsReady() {
return fmt.Errorf("not all snapshot segments are available")
}