diff options
| author | Lisandro Pin <lisandro.pin@proton.ch> | 2025-01-30 22:08:36 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-30 13:08:36 -0800 |
| commit | fc4df944a0dd807db4f9e16dbdf8fc8d96b19c96 (patch) | |
| tree | 0e15ee704a87b48fb57a01a1ba2a704b00c44272 | |
| parent | 331c1f0f3f1a227b76a6752aa051c031a3655903 (diff) | |
| download | seaweedfs-fc4df944a0dd807db4f9e16dbdf8fc8d96b19c96.tar.xz seaweedfs-fc4df944a0dd807db4f9e16dbdf8fc8d96b19c96.zip | |
Remove rate limit semaphore on master's leader selection logic. (#6494)
This was introduced by 054374c7 (2024-03-12) and serves no practical purpose,
yet it caps the maximum QPS master servers can handle.
| -rw-r--r-- | weed/server/master_server.go | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/weed/server/master_server.go b/weed/server/master_server.go index c6cb7762d..8621708d2 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, |
