Pengzna commented on code in PR #12355:
URL: https://github.com/apache/iotdb/pull/12355#discussion_r1615147648
##########
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/pipe/task/CreatePipeProcedureV2.java:
##########
@@ -137,31 +144,49 @@ public void
executeFromCalculateInfoForTask(ConfigNodeProcedureEnv env) {
final ConcurrentMap<Integer, PipeTaskMeta> consensusGroupIdToTaskMetaMap =
new ConcurrentHashMap<>();
- // data regions & schema regions
- env.getConfigManager()
- .getLoadManager()
- .getRegionLeaderMap()
- .forEach(
- (regionGroupId, regionLeaderNodeId) -> {
- final String databaseName =
-
env.getConfigManager().getPartitionManager().getRegionStorageGroup(regionGroupId);
- if (databaseName != null &&
!databaseName.equals(SchemaConstant.SYSTEM_DATABASE)) {
- // Pipe only collect user's data, filter out metric database
here.
- consensusGroupIdToTaskMetaMap.put(
- regionGroupId.getId(),
- new PipeTaskMeta(MinimumProgressIndex.INSTANCE,
regionLeaderNodeId));
- }
- });
-
- // config region
- consensusGroupIdToTaskMetaMap.put(
- // 0 is the consensus group id of the config region, but data region
id and schema region id
- // also start from 0, so we use Integer.MIN_VALUE to represent the
config region
- Integer.MIN_VALUE,
- new PipeTaskMeta(
- MinimumProgressIndex.INSTANCE,
- // The leader of the config region is the config node itself
- ConfigNodeDescriptor.getInstance().getConf().getConfigNodeId()));
+ if (PipeType.CONSENSUS.equals(pipeStaticMeta.getPipeType())) {
Review Comment:
Good catch! I indeed hava encountered this bug when applying test. fixed.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]