From 922b5754daca3959a699d9200de430e69bb29778 Mon Sep 17 00:00:00 2001 From: "alex.sharov" Date: Wed, 11 Jan 2023 10:14:59 +0700 Subject: [PATCH] STOP_AFTER_RECONSTITUTE=true --- common/dbg/experiments.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/common/dbg/experiments.go b/common/dbg/experiments.go index a9e26db88..f5d50da6a 100644 --- a/common/dbg/experiments.go +++ b/common/dbg/experiments.go @@ -245,3 +245,19 @@ func StopAfterStage() string { stopAfterStageFlag.Do(f) return stopAfterStage } + +var ( + stopAfterReconst bool + stopAfterReconstOnce sync.Once +) + +func StopAfterReconst() bool { + stopAfterReconstOnce.Do(func() { + v, _ := os.LookupEnv("STOP_AFTER_RECONSTITUTE") + if v == "true" { + stopAfterReconst = true + log.Info("[Experiment]", "STOP_AFTER_RECONSTITUTE", writeMap) + } + }) + return stopAfterReconst +}