mirror of
https://github.com/cubefs/cubefs.git
synced 2026-08-02 02:00:56 +00:00
fix(data): avoid replicas empty when buildDataPartitionRepairTask. #1000134827
Signed-off-by: Victor1319 <zengxuewei@oppo.com>
This commit is contained in:
parent
8f0590bc1a
commit
e7edd63446
@ -157,6 +157,10 @@ func (dp *DataPartition) repair(extentType uint8) {
|
||||
}
|
||||
|
||||
func (dp *DataPartition) buildDataPartitionRepairTask(repairTasks []*DataPartitionRepairTask, extentType uint8, tinyExtents []uint64, replica []string) (err error) {
|
||||
if len(repairTasks) == 0 {
|
||||
return fmt.Errorf("dp replica is empty. dp %d, replicas %v", dp.partitionID, dp.replicas)
|
||||
}
|
||||
|
||||
// get the local extent info
|
||||
extents, leaderTinyDeleteRecordFileSize, err := dp.getLocalExtentInfo(extentType, tinyExtents)
|
||||
if err != nil {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user