From 93691c5d750028d64a35b4b0cc0049ccddcfb35d Mon Sep 17 00:00:00 2001 From: Abhinav Dangeti Date: Tue, 17 Dec 2024 10:54:20 -0700 Subject: [PATCH] MB-64604: Remove unnecessary second map lookup --- index/scorch/snapshot_index.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/index/scorch/snapshot_index.go b/index/scorch/snapshot_index.go index 8ad073f0f..51ffc859b 100644 --- a/index/scorch/snapshot_index.go +++ b/index/scorch/snapshot_index.go @@ -642,8 +642,7 @@ var DefaultFieldTFRCacheThreshold int = 0 // disabled because it causes MB-64604 func (is *IndexSnapshot) getFieldTFRCacheThreshold() int { if is.parent.config != nil { - if _, exists := is.parent.config["fieldTFRCacheThreshold"]; exists { - val := is.parent.config["fieldTFRCacheThreshold"] + if val, exists := is.parent.config["fieldTFRCacheThreshold"]; exists { if x, ok := val.(float64); ok { // JSON unmarshal-ed into a map[string]interface{} will default // to float64 for numbers, so we need to check for float64 first.