mirror of
https://github.com/cubefs/cubefs.git
synced 2026-08-02 02:00:56 +00:00
fix(blobstore): avoid unnecessary work for disabled codemodes
Signed-off-by: yuzhiqiang <yuzhiqiang_yewu@cmss.chinamobile.com>
This commit is contained in:
parent
b4a41d9007
commit
2912760ee5
@ -337,12 +337,13 @@ func (v *volumeMgr) initModeInfo(ctx context.Context) (err error) {
|
||||
return errors.Base(err, "json.Unmarshal code_mode policy err").Detail(err)
|
||||
}
|
||||
for _, codeModeConfig := range codeModeConfigInfos {
|
||||
allocCh := make(chan *allocArgs)
|
||||
codeMode := codeModeConfig.ModeName.GetCodeMode()
|
||||
if !codeModeConfig.Enable {
|
||||
continue
|
||||
}
|
||||
|
||||
allocCh := make(chan *allocArgs)
|
||||
codeMode := codeModeConfig.ModeName.GetCodeMode()
|
||||
|
||||
v.allocChs[codeMode] = allocCh
|
||||
tactic := codeMode.Tactic()
|
||||
threshold := float64(v.InitVolumeNum*tactic.N*volumeChunkSizeInt) * v.TotalThresholdRatio
|
||||
|
||||
Loading…
Reference in New Issue
Block a user