aboutsummaryrefslogtreecommitdiff
path: root/weed/worker/log_adapter.go
diff options
context:
space:
mode:
authorMariano Ntrougkas <44480600+marios1861@users.noreply.github.com>2025-10-23 02:16:46 +0300
committerGitHub <noreply@github.com>2025-10-22 16:16:46 -0700
commitfa025dc96f5279ad90bcff13ca67ab1a7a52db9c (patch)
tree6889b76de06420c5ca86699dcb1cae443df9dd00 /weed/worker/log_adapter.go
parentf7bd75ef3bf993a8f4aa5b647617556ab7567596 (diff)
downloadseaweedfs-fa025dc96f5279ad90bcff13ca67ab1a7a52db9c.tar.xz
seaweedfs-fa025dc96f5279ad90bcff13ca67ab1a7a52db9c.zip
♻️ refactor(worker): decouple state management using command-query pattern (#7354)
* ♻️ refactor(worker): decouple state management using command-query pattern This commit eliminates all uses of sync.Mutex across the `worker.go` and `client.go` components, changing how mutable state is accessed and modified. Single Owner Principle is now enforced. - Guarantees thread safety and prevents data races by ensuring that only one goroutine ever modifies or reads state. Impact: Improves application concurrency, reliability, and maintainability by isolating state concerns. * 🐛 fix(worker): fix race condition when closing The use of select/default is wrong for mandatory shutdown signals. * 🐛 fix(worker): do not get tickers in every iteration * 🐛 fix(worker): fix race condition when closing pt 2 refactor `handleOutgoing` to mirror the non-blocking logic of `handleIncoming` * address comments * To ensure stream errors are always processed, the send should be blocking. * avoid blocking the manager loop while waiting for tasks to complete --------- Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com> Co-authored-by: Chris Lu <chris.lu@gmail.com>
Diffstat (limited to 'weed/worker/log_adapter.go')
0 files changed, 0 insertions, 0 deletions