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.

waits in case master lost connection

Chris Lu0b00edfc3b32
diff --git a/weed/wdclient/masterclient.go b/weed/wdclient/masterclient.go
index e39b9dfdfa..da812dc22f 100644
--- a/weed/wdclient/masterclient.go
+++ b/weed/wdclient/masterclient.go
@@ -36,6 +36,9 @@ func NewMasterClient(grpcDialOption grpc.DialOption, clientType string, clientHo
}
func (mc *MasterClient) GetMaster() string {
+ for mc.currentMaster == "" {
+ time.Sleep(time.Duration(rand.Int31n(200)) * time.Millisecond)
+ }
return mc.currentMaster
}