fix(master): not return discard dp for datanode get api. #1000135139

Signed-off-by: Victor1319 <zengxuewei@oppo.com>
This commit is contained in:
Victor1319 2025-05-21 20:26:41 +08:00 committed by zhumingze1108
parent e7edd63446
commit 60baf1ff40

View File

@ -2366,6 +2366,9 @@ func (c *Cluster) getAllDataPartitionIDByDatanode(addr string) (partitionIDs []u
safeVols := c.allVols()
for _, vol := range safeVols {
for _, dp := range vol.dataPartitions.partitions {
if dp.IsDiscard {
continue
}
for _, host := range dp.Hosts {
if host == addr {
partitionIDs = append(partitionIDs, dp.PartitionID)