diff options
| author | Chris Lu <chris.lu@gmail.com> | 2021-07-13 01:29:57 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2021-07-13 01:29:57 -0700 |
| commit | 49c66e88a0144247533e88f2b99c4731bd67bf10 (patch) | |
| tree | a75c27adff10cf7c37a6884bcafef68448ace614 /weed/command/volume.go | |
| parent | 01adc567aae3b03e09601c4db1b413be1e0c90bc (diff) | |
| download | seaweedfs-49c66e88a0144247533e88f2b99c4731bd67bf10.tar.xz seaweedfs-49c66e88a0144247533e88f2b99c4731bd67bf10.zip | |
volume: change all writes to fsync during graceful stopping
fix https://github.com/chrislusf/seaweedfs/issues/2193
Diffstat (limited to 'weed/command/volume.go')
| -rw-r--r-- | weed/command/volume.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/weed/command/volume.go b/weed/command/volume.go index 38a52efee..712fa0dce 100644 --- a/weed/command/volume.go +++ b/weed/command/volume.go @@ -259,6 +259,7 @@ func (v VolumeServerOptions) startVolumeServer(volumeFolders, maxVolumeCounts, v // Stop heartbeats if !volumeServer.StopHeartbeat() { + volumeServer.SetStopping() glog.V(0).Infof("stop send heartbeat and wait %d seconds until shutdown ...", *v.preStopSeconds) time.Sleep(time.Duration(*v.preStopSeconds) * time.Second) } |
