Skip to content

ScatterRegions not returning which region(s) are failed to scatter #9088

@D3Hunter

Description

@D3Hunter

Bug Report

What did you do?

ScatterRegions not returning which region(s) are failed to scatter. br/lightning now will prefer ScatterRegions to do region scatter for performance reason, but if some regions failed to scatter for reasons like region %d is not fully replicated, it will also return success and only give a percentage of success regions, but doesn't tell client which failed. currently br/lightning will take this as success, and will move on, and cause region/data skew.

br/lightning have retry on scatter, but need PD returns which regions have failed

if len(failures) > 0 {
percentage = 100 - 100*len(failures)/(opsCount+len(failures))
log.Debug("scatter regions", zap.Errors("failures", func() []error {
r := make([]error, 0, len(failures))
for _, err := range failures {
r = append(r, err)
}
return r
}()))
}
return &schedulingpb.ScatterRegionsResponse{
Header: wrapHeader(),
FinishedPercentage: uint64(percentage),
}, nil

What did you expect to see?

What did you see instead?

What version of PD are you using (pd-server -V)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    affects-6.1This bug affects the 6.1.x(LTS) versions.affects-6.5This bug affects the 6.5.x(LTS) versions.affects-7.1This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.affects-8.5This bug affects the 8.5.x(LTS) versions.severity/majortype/bugThe issue is confirmed as a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions