aboutsummaryrefslogtreecommitdiff
path: root/weed/query/engine/arithmetic_functions_test.go
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2025-10-08 20:52:20 -0700
committerGitHub <noreply@github.com>2025-10-08 20:52:20 -0700
commite90809521b0df68de523d23949cd0ea4f90d9850 (patch)
treee437a237ac30c6dacfed1f93fa8dcde65932cbba /weed/query/engine/arithmetic_functions_test.go
parentd0a338684c97cdd3042bc6c158ff35ab5ac16c50 (diff)
downloadseaweedfs-e90809521b0df68de523d23949cd0ea4f90d9850.tar.xz
seaweedfs-e90809521b0df68de523d23949cd0ea4f90d9850.zip
Fix #7307: Prevent infinite loop in volume.check.disk (#7308)
The volume.check.disk command could get stuck in an infinite loop when syncing replicas that have persistent discrepancies that cannot be resolved. This happened because the sync loop had no maximum iteration limit and no detection for when progress stopped being made. Issues fixed: 1. Infinite loop: Added maxIterations limit (5) to prevent endless looping 2. Progress detection: Detect when hasChanges state doesn't change between iterations, indicating sync is stuck 3. Return value bug: Fixed naked return statement that was returning zero values instead of the actual hasChanges value, causing incorrect loop termination logic Changes: - Added maximum iteration limit with clear error messages - Added progress detection to identify stuck sync situations - Fixed return statement to properly return hasChanges and error - Added verbose logging for sync iterations The fix ensures that: - Sync will terminate after 5 iterations maximum - Users get clear messages about why sync stopped - The hasChanges logic properly reflects deletion sync results Fixes #7307
Diffstat (limited to 'weed/query/engine/arithmetic_functions_test.go')
0 files changed, 0 insertions, 0 deletions