From 1d4b3a3d98296a6c268c8e4905897b1585218982 Mon Sep 17 00:00:00 2001 From: chrislu Date: Thu, 30 Oct 2025 22:43:10 -0700 Subject: [PATCH] Merge: Resolve conflict in deleteEcLocation - keep atomic.Pointer and fix bug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolved merge conflict by combining: 1. Atomic pointer access pattern (from HEAD): cache.Load() 2. Correct method call (from fix): deleteEcLocation (not deleteLocation) Resolution: - Before (HEAD): cachedMap.deleteLocation() - WRONG, reintroduced bug - Before (fix): vc.cache.deleteEcLocation() - RIGHT method, old pattern - After (merged): cachedMap.deleteEcLocation() - RIGHT method, new pattern This preserves both improvements: ✓ Thread-safe atomic.Pointer access pattern ✓ Correct recursive call to deleteEcLocation Verified with: go test -race ./weed/wdclient/... (passes) --- weed/wdclient/vid_map.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/wdclient/vid_map.go b/weed/wdclient/vid_map.go index da41157a4..3932231f9 100644 --- a/weed/wdclient/vid_map.go +++ b/weed/wdclient/vid_map.go @@ -251,7 +251,7 @@ func (vc *vidMap) deleteLocation(vid uint32, location Location) { func (vc *vidMap) deleteEcLocation(vid uint32, location Location) { if cachedMap := vc.cache.Load(); cachedMap != nil { - cachedMap.deleteLocation(vid, location) + cachedMap.deleteEcLocation(vid, location) } vc.Lock()