mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-29 16:30:44 +01:00
fix: add IdxFileSize check to pre-delete volume verification
The verification step checked DatFileSize and FileCount but not IdxFileSize, leaving a gap in the copy validation before source deletion.
This commit is contained in:
1 parent
5f85bf5e8a
commit
cf3693651c
1 file changed
+4
@@ -137,6 +137,10 @@ func (t *BalanceTask) Execute(ctx context.Context, params *worker_pb.TaskParams)
|
||||
return fmt.Errorf("aborting: volume %d file count mismatch — source %d, target %d",
|
||||
volumeId, sourceStatus.FileCount, targetStatus.FileCount)
|
||||
}
|
||||
if targetStatus.IdxFileSize != sourceStatus.IdxFileSize {
|
||||
return fmt.Errorf("aborting: volume %d .idx size mismatch — source %d bytes, target %d bytes",
|
||||
volumeId, sourceStatus.IdxFileSize, targetStatus.IdxFileSize)
|
||||
}
|
||||
|
||||
// Step 6: Delete from source — after this, the move is committed.
|
||||
// Clear the readonly flag so the defer doesn't try to restore writability.
|
||||
|
||||
Reference in new issue
Block a user