mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 02:27:26 +01:00
G5-5C #6.1: doc-fix Stop vs StopHard production/test guidance per Batch 6 review
Architect Batch 6 review 2026-04-27 follow-up: clarify in code that Stop is the production shutdown path; StopHard is for test fault-injection / emergency stop only. Prevents future misuse where operators reach for StopHard as a default shutdown route, masking graceful-drain bugs. No code change. No test change.
This commit is contained in:
1 parent
8d813f6ca1
commit
130e95e226
1 file changed
+8
@@ -112,6 +112,14 @@ func (r *ReplicaListener) Serve() {
|
||||
// the conn or sends a frame; if you need to force handler exit
|
||||
// regardless of remote state (e.g., simulating replica-process death
|
||||
// in tests), use StopHard.
|
||||
//
|
||||
// Production / operational guidance: prefer Stop for normal shutdown
|
||||
// (process exit, role change, volume close) — handlers exit cleanly
|
||||
// after the OS-level FIN/RST from the remote primary's process exit
|
||||
// or transport timeout. StopHard is intended for test fault-injection
|
||||
// and exceptional emergency-stop paths only; using it as the default
|
||||
// shutdown route on production deployments would mask graceful-drain
|
||||
// bugs that real-world primaries depend on.
|
||||
func (r *ReplicaListener) Stop() {
|
||||
select {
|
||||
case <-r.stopCh:
|
||||
|
||||
Reference in new issue
Block a user