Browse Source
Update weed/wdclient/filer_client.go
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
pull/7550/head
Chris Lu
1 week ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
1 additions and
1 deletions
-
weed/wdclient/filer_client.go
|
|
@ -504,7 +504,7 @@ func (fc *FilerClient) shouldSkipUnhealthyFilerWithHealth(health *filerHealth) b |
|
|
|
|
|
|
|
|
// Deprecated: Use shouldSkipUnhealthyFilerWithHealth instead
|
|
|
// Deprecated: Use shouldSkipUnhealthyFilerWithHealth instead
|
|
|
// This function is kept for backward compatibility but requires array access
|
|
|
// This function is kept for backward compatibility but requires array access
|
|
|
// Note: Accesses filerHealth without lock; safe only when discovery is disabled
|
|
|
|
|
|
|
|
|
// Note: This function is now thread-safe.
|
|
|
func (fc *FilerClient) shouldSkipUnhealthyFiler(index int32) bool { |
|
|
func (fc *FilerClient) shouldSkipUnhealthyFiler(index int32) bool { |
|
|
fc.filerAddressesMu.RLock() |
|
|
fc.filerAddressesMu.RLock() |
|
|
if index >= int32(len(fc.filerHealth)) { |
|
|
if index >= int32(len(fc.filerHealth)) { |
|
|
|