aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLHHDZ <changlin.shi@ly.com>2023-03-30 02:29:44 +0800
committerGitHub <noreply@github.com>2023-03-29 11:29:44 -0700
commit8e80ce9476c6895cd61e8401d30913c12e7e05b6 (patch)
treecf1b0c5e167c039558e02cd3c8b8af3cb9d64ee9
parentff649d615dc965fbe594beb074013b131288b3b7 (diff)
downloadseaweedfs-8e80ce9476c6895cd61e8401d30913c12e7e05b6.tar.xz
seaweedfs-8e80ce9476c6895cd61e8401d30913c12e7e05b6.zip
fix key corrupt when fs.configure copy path trie (#4353)
Signed-off-by: changlin.shi <changlin.shi@ly.com>
-rw-r--r--weed/filer/filer_conf.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/weed/filer/filer_conf.go b/weed/filer/filer_conf.go
index b12d54fc8..f3a25242d 100644
--- a/weed/filer/filer_conf.go
+++ b/weed/filer/filer_conf.go
@@ -125,7 +125,8 @@ func (fc *FilerConf) DeleteLocationConf(locationPrefix string) {
if string(key) == locationPrefix {
return true
}
- rules.Put(key, value)
+ key = bytes.Clone(key)
+ _ = rules.Put(key, value)
return true
})
fc.rules = rules