From 7f8ab63b7dc11d84e22f21e49933d10edfe27ed5 Mon Sep 17 00:00:00 2001 From: LHHDZ Date: Thu, 30 Mar 2023 02:29:44 +0800 Subject: [PATCH] fix key corrupt when fs.configure copy path trie (#4353) Signed-off-by: changlin.shi --- weed/filer/filer_conf.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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