wangbo commented on a change in pull request #2781: Batch Operate Rollup table
in Doris #2671
URL: https://github.com/apache/incubator-doris/pull/2781#discussion_r376756667
##########
File path: fe/src/main/java/org/apache/doris/alter/RollupJobV2.java
##########
@@ -614,33 +614,35 @@ private void replayPending(RollupJobV2 replayedJob) {
// table may be dropped before replaying this log. just return
return;
}
-
- // add all rollup replicas to tablet inverted index
- TabletInvertedIndex invertedIndex =
Catalog.getCurrentInvertedIndex();
- for (Long partitionId : partitionIdToRollupIndex.keySet()) {
- MaterializedIndex rollupIndex =
partitionIdToRollupIndex.get(partitionId);
- TStorageMedium medium =
tbl.getPartitionInfo().getDataProperty(partitionId).getStorageMedium();
- TabletMeta rollupTabletMeta = new TabletMeta(dbId, tableId,
partitionId, rollupIndexId,
- rollupSchemaHash, medium);
-
- for (Tablet rollupTablet : rollupIndex.getTablets()) {
- invertedIndex.addTablet(rollupTablet.getId(),
rollupTabletMeta);
- for (Replica rollupReplica : rollupTablet.getReplicas()) {
- invertedIndex.addReplica(rollupTablet.getId(),
rollupReplica);
- }
- }
- }
- tbl.setState(OlapTableState.ROLLUP);
+ addTabletToInvertedIndex(tbl);
} finally {
db.writeUnlock();
}
- this.jobState = JobState.WAITING_TXN;
+ this.jobState = JobState.PENDING;
Review comment:
👌
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]