Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jakozaur committed May 3, 2024
1 parent 24f11f6 commit fea5b37
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
1 change: 0 additions & 1 deletion quesma/quesma/search_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,6 @@ func TestAllUnsupportedQueryTypesAreProperlyRecorded(t *testing.T) {
assert.Equal(t, 1, managementConsole.GetTotalUnsupportedQueries())
assert.Equal(t, 1, managementConsole.GetSavedUnsupportedQueries())
assert.Equal(t, 1, len(managementConsole.GetUnsupportedTypesWithCount()))
return
})
}
}
Expand Down
6 changes: 0 additions & 6 deletions quesma/quesma/ui/unsupported_queries.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,12 @@ import (
"mitmproxy/quesma/tracing"
"regexp"
"sort"
"sync"
)

const UnrecognizedQueryType = "unrecognized"

var unsupportedSearchQueryRegex, _ = regexp.Compile(logger.Reason + `":"` + logger.ReasonPrefixUnsupportedQueryType + `([[:word:]]+)"`)

type UnsupportedSearchQueries struct {
mutex sync.Mutex // it's a rare situation to not support some query, let's do everything here under this mutex for simplicity // how many we saved (max 10 per type)
totalUnsupportedQueries int // we many we've seen total
}

func processUnsupportedLogMessage(log tracing.LogWithLevel) *string {
if log.Level != zerolog.ErrorLevel && log.Level != zerolog.WarnLevel { // only error and log
return nil
Expand Down

0 comments on commit fea5b37

Please sign in to comment.