Fix ttProtection.enabled and memProtection (#19756)

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
This commit is contained in:
bigsheeper 2022-10-13 16:15:25 +08:00 committed by GitHub
parent 146a3342c3
commit efdce464f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -349,7 +349,7 @@ func (q *QuotaCenter) calculateWriteRates() error {
log.Debug("QuotaCenter check timeTickDelay done", zap.Float64("ttFactor", ttFactor))
memFactor := q.memoryToWaterLevel()
if ttFactor <= 0 {
if memFactor <= 0 {
q.forceDenyWriting(MemoryExhausted) // memory protection
return nil
}

View File

@ -432,7 +432,7 @@ func (p *quotaConfig) initForceDenyWriting() {
}
func (p *quotaConfig) initTtProtectionEnabled() {
p.TtProtectionEnabled = p.Base.ParseBool("quotaAndLimits.limitWriting.ttProtection", true)
p.TtProtectionEnabled = p.Base.ParseBool("quotaAndLimits.limitWriting.ttProtection.enabled", true)
}
func (p *quotaConfig) initMaxTimeTickDelay() {