Files
seaweedfs/weed
chrislu c4c4d227a1 Further reduce lock contention in LookupVolumeIdsWithFallback
Optimized two loops that were holding RLock for extended periods:

Before:
- Held RLock during entire loop iteration
- Included string parsing and cache lookups
- Could block resetVidMap for significant time with large batches

After:
- Grab vidMap pointer with brief RLock
- Release lock immediately
- Perform all loop operations on local pointer

Impact:
- First loop: Cache check on initial volumeIds
- Second loop: Double-check after singleflight wait

Benefits:
- Minimal lock hold time (just pointer copy)
- resetVidMap no longer blocked by long loops
- Better concurrent performance with large volume ID lists
- Still thread-safe (vidMap methods have internal locks)

Verified with: go test -race ./weed/wdclient/... (passes)
2025-10-30 20:44:33 -07:00
..
2025-10-27 23:04:55 -07:00
2025-10-27 17:33:10 -07:00
2025-10-13 18:05:17 -07:00
2025-08-31 23:31:28 -07:00
2025-10-27 23:04:55 -07:00
2025-10-27 23:04:55 -07:00
2024-06-25 09:18:11 -07:00
2025-08-30 11:15:48 -07:00
2024-02-14 08:26:38 -08:00
2025-10-28 17:57:51 -07:00
2025-10-30 16:43:29 -07:00
2025-10-27 23:04:55 -07:00
2025-07-19 21:43:34 -07:00
2025-03-17 23:13:27 -07:00