[fix](partition) Fix be tablet partition id eq 0 By report tablet (#32179) (#32667)

This commit is contained in:
deardeng
2024-03-22 15:38:58 +08:00
committed by GitHub
parent 0f343e914a
commit ab467f53db
6 changed files with 55 additions and 2 deletions

View File

@ -167,6 +167,15 @@ public class TabletInvertedIndex {
tabletMetaInfo.setIsInMemory(!backendTabletInfo.isIsInMemory());
}
}
if (Config.fix_tablet_partition_id_eq_0
&& tabletMeta.getPartitionId() > 0
&& backendTabletInfo.getPartitionId() == 0) {
LOG.warn("be report tablet partition id not eq fe, in be {} but in fe {}",
backendTabletInfo, tabletMeta);
// Need to update partition id in BE
tabletMetaInfo = new TTabletMetaInfo();
tabletMetaInfo.setPartitionId(tabletMeta.getPartitionId());
}
// 1. (intersection)
if (needSync(replica, backendTabletInfo)) {
// need sync