Skip to content

Commit

Permalink
Fix unnecessary additional lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinavdangeti committed Dec 17, 2024
1 parent d5819ce commit 022dc34
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions index/scorch/snapshot_index.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 022dc34

Please sign in to comment.