Browse Source
Address code review: https://github.com/seaweedfs/seaweedfs/pull/7550#pullrequestreview-3512223723 **Issue:** After successful failover, the current filer index was not updated. This meant every subsequent request would still try the (potentially unhealthy) original filer first, then failover again. **Solution:** 1. Added FilerClient.SetCurrentFiler(addr) method: - Finds the index of specified filer address - Atomically updates filerIndex to point to it - Thread-safe with RLock 2. Call SetCurrentFiler after successful failover: - Update happens immediately after successful connection - Future requests start with the known-healthy filer - Reduces unnecessary failover attempts **Benefits:** ✅ Subsequent requests use healthy filer directly ✅ No repeated failover to same unhealthy filer ✅ Better performance - fast path hits healthy filer ✅ Comment now matches actual behaviorpull/7550/head
2 changed files with 17 additions and 1 deletions
Loading…
Reference in new issue