From 7d0dd0047dc72c8f7c44f7beab9cde5c90f4d1c8 Mon Sep 17 00:00:00 2001 From: "yihao.dai" Date: Sat, 30 Sep 2023 17:05:27 +0800 Subject: [PATCH] Use path.Join when init ChunkCache path (#27433) Signed-off-by: bigsheeper --- internal/querynodev2/server.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/querynodev2/server.go b/internal/querynodev2/server.go index bbc831e87ac04..9fc84f8558a37 100644 --- a/internal/querynodev2/server.go +++ b/internal/querynodev2/server.go @@ -236,13 +236,13 @@ func (node *QueryNode) InitSegcore() error { if len(mmapDirPath) == 0 { mmapDirPath = paramtable.Get().LocalStorageCfg.Path.GetValue() } - mmapDirPath += "/chunk_cache" + chunkCachePath := path.Join(mmapDirPath, "chunk_cache") policy := paramtable.Get().QueryNodeCfg.ReadAheadPolicy.GetValue() - err = initcore.InitChunkCache(mmapDirPath, policy) + err = initcore.InitChunkCache(chunkCachePath, policy) if err != nil { return err } - log.Info("InitChunkCache done", zap.String("dir", mmapDirPath), zap.String("policy", policy)) + log.Info("InitChunkCache done", zap.String("dir", chunkCachePath), zap.String("policy", policy)) initcore.InitTraceConfig(paramtable.Get()) return nil