Files
seaweedfs/weed
Chris Lu e90809521b 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
2025-10-08 20:52:20 -07:00
..
2025-08-09 21:47:29 -07:00
2025-07-19 23:56:17 -07:00
2025-08-30 11:15:48 -07:00
2025-08-31 23:31:28 -07:00
2025-09-30 20:20:24 -07:00
2025-08-22 01:15:42 -07:00
2025-09-10 11:04:42 -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-07-19 21:43:34 -07:00
2025-03-17 23:13:27 -07:00