Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

fix bug: replication, metadata not replicated

sparklxb4049c72e6cff
diff --git a/weed/topology/store_replicate.go b/weed/topology/store_replicate.go
index aa312ac036..d7fb501c0a 100644
--- a/weed/topology/store_replicate.go
+++ b/weed/topology/store_replicate.go
@@ -58,10 +58,14 @@ func ReplicatedWrite(masterNode string, s *storage.Store,
pairMap := make(map[string]string)
if needle.HasPairs() {
- err := json.Unmarshal(needle.Pairs, &pairMap)
+ tmpMap := make(map[string]string)
+ err := json.Unmarshal(needle.Pairs, &tmpMap)
if err != nil {
glog.V(0).Infoln("Unmarshal pairs error:", err)
}
+ for k, v := range tmpMap {
+ pairMap[storage.PairNamePrefix+k] = v
+ }
}
_, err := operation.Upload(u.String(),