Skip to content

Commit 5218d7a

Browse files
authored
SNOW-894815 Fix access to params from htap (#934)
1 parent fcdd18a commit 5218d7a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

htap.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ func (qcc *queryContextCache) prune(size int) {
7979
}
8080

8181
func (qcc *queryContextCache) getQueryContextCacheSize(sc *snowflakeConn) int {
82-
if sizeStr, ok := sc.cfg.Params[queryContextCacheSizeParamName]; ok {
82+
paramsMutex.Lock()
83+
sizeStr, ok := sc.cfg.Params[queryContextCacheSizeParamName]
84+
paramsMutex.Unlock()
85+
if ok {
8386
size, err := strconv.Atoi(*sizeStr)
8487
if err != nil {
8588
logger.Warnf("cannot parse %v as int as query context cache size: %v", sizeStr, err)

0 commit comments

Comments
 (0)