Browse Source

Merge: Resolve conflict in deleteEcLocation - keep atomic.Pointer and fix bug

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)
pull/7412/head
chrislu 2 months ago
parent
commit
1d4b3a3d98
  1. 2
      weed/wdclient/vid_map.go

2
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()

Loading…
Cancel
Save