Block RPC write operations on volume servers when maintenance mode is enabled (#8115)
* Boostrap persistent state for volume servers. This PR implements logic load/save persistent state information for storages associated with volume servers, and reporting state changes back to masters via heartbeat messages. More work ensues! See https://github.com/seaweedfs/seaweedfs/issues/7977 for details. * Block RPC operations writing to volume servers when maintenance mode is on.
This commit is contained in:
@@ -11,9 +11,12 @@ import (
|
||||
)
|
||||
|
||||
func (vs *VolumeServer) BatchDelete(ctx context.Context, req *volume_server_pb.BatchDeleteRequest) (*volume_server_pb.BatchDeleteResponse, error) {
|
||||
|
||||
resp := &volume_server_pb.BatchDeleteResponse{}
|
||||
|
||||
if err := vs.CheckMaintenanceMode(); err != nil {
|
||||
return resp, err
|
||||
}
|
||||
|
||||
now := uint64(time.Now().Unix())
|
||||
|
||||
for _, fid := range req.FileIds {
|
||||
|
||||
Reference in New Issue
Block a user