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.

Remove rate limit semaphore on master's leader selection logic. (#6494)

Lisandro Pinfc4df944a0dd
diff --git a/weed/server/master_server.go b/weed/server/master_server.go
index c6cb7762de..8621708d27 100644
--- a/weed/server/master_server.go
+++ b/weed/server/master_server.go
@@ -65,8 +65,6 @@ type MasterServer struct {
vg *topology.VolumeGrowth
volumeGrowthRequestChan chan *topology.VolumeGrowRequest
- boundedLeaderChan chan int
-
// notifying clients
clientChansLock sync.RWMutex
clientChans map[string]chan *master_pb.KeepConnectedResponse
@@ -122,7 +120,6 @@ func NewMasterServer(r *mux.Router, option *MasterOption, peers map[string]pb.Se
adminLocks: NewAdminLocks(),
Cluster: cluster.NewCluster(),
}
- ms.boundedLeaderChan = make(chan int, 16)
ms.MasterClient.SetOnPeerUpdateFn(ms.OnPeerUpdate)
@@ -228,8 +225,6 @@ func (ms *MasterServer) proxyToLeader(f http.HandlerFunc) http.HandlerFunc {
return
}
- ms.boundedLeaderChan <- 1
- defer func() { <-ms.boundedLeaderChan }()
targetUrl, err := url.Parse("http://" + raftServerLeader)
if err != nil {
writeJsonError(w, r, http.StatusInternalServerError,