forked from TrueCloudLab/frostfs-node
[#1072] node, ir: Add new config option kludge_compatibility_mode
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
parent
d614f04a0a
commit
9aa533e59a
6 changed files with 28 additions and 3 deletions
|
@ -109,6 +109,9 @@ type applicationConfiguration struct {
|
|||
lowMem bool
|
||||
rebuildWorkers uint32
|
||||
}
|
||||
|
||||
// if need to run node in compatibility with other versions mode
|
||||
cmode *atomic.Bool
|
||||
}
|
||||
|
||||
type shardCfg struct {
|
||||
|
@ -204,10 +207,13 @@ func (a *applicationConfiguration) readConfig(c *config.Config) error {
|
|||
}
|
||||
|
||||
// clear if it is rereading
|
||||
cmode := a.cmode
|
||||
*a = applicationConfiguration{}
|
||||
a.cmode = cmode
|
||||
}
|
||||
|
||||
a._read = true
|
||||
a.cmode.Store(nodeconfig.CompatibilityMode(c))
|
||||
|
||||
// Logger
|
||||
|
||||
|
@ -648,7 +654,11 @@ type cfgControlService struct {
|
|||
var persistateSideChainLastBlockKey = []byte("side_chain_last_processed_block")
|
||||
|
||||
func initCfg(appCfg *config.Config) *cfg {
|
||||
c := &cfg{}
|
||||
c := &cfg{
|
||||
applicationConfiguration: applicationConfiguration{
|
||||
cmode: &atomic.Bool{},
|
||||
},
|
||||
}
|
||||
|
||||
err := c.readConfig(appCfg)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue