Skip to content

[IOTDB-2687] Base partition policy of data#5464

Merged
qiaojialin merged 19 commits intoapache:masterfrom
CRZbulabula:base_partition_policy_of_data
Apr 11, 2022
Merged

[IOTDB-2687] Base partition policy of data#5464
qiaojialin merged 19 commits intoapache:masterfrom
CRZbulabula:base_partition_policy_of_data

Conversation

@CRZbulabula
Copy link
Copy Markdown
Contributor

Updates of ConfigNode:

  1. Support random data partition policy.
  2. Specification of Thrift interfaces. See ConfigNode for DataNode RPC 接口定义 for more details.
  3. Specification of ConfigNode structure. See ConfigNode 架构 for more details.

@CRZbulabula CRZbulabula changed the title Base partition policy of data [IOTDB-2687] Base partition policy of data Apr 9, 2022
Copy link
Copy Markdown
Member

@qiaojialin qiaojialin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to add some test

rpcSchemaPartitionInfo.setSchemaRegionDataNodesMap(schemaRegionReplicaSets);
return rpcSchemaPartitionInfo;

// resp.setSchemaRegionMap(schemaRegionMap);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this right?

Copy link
Copy Markdown
Contributor Author

@CRZbulabula CRZbulabula Apr 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure currently. I first update the process of get or create SchemaPartition in ConfigNode. But then the discussion on Friday decides to change interfaces about SchemaPartition. And the PatternTree isn't ready to use for ConfigNode now. So I comment this codes casually. I'll check this codes and support new SchemaPartition interfaces in next PR.

Copy link
Copy Markdown
Contributor

@OneSizeFitsQuorum OneSizeFitsQuorum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PTAL

// TODO: optimize
result = new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode());
result.setMessage(String.valueOf(dataNodeInfo.getDataNodeInfo(info)));
} else {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some judgmental and calculation logic can be placed in the manager. Only when certain conditions are met, the logic needs to be pushed down to the consensus layer.
一些判断性的和计算的逻辑可以放在manager中,只有满足一定条件后才需要下推到共识层。这样可以减轻共识层的压力。

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The judgment and calculation logic of register DataNode is on ConfigNodeRPCServerProcessor currently. In order not to return a weird TSStatus that blend with configuration parameters underneath the manager layer.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

import java.nio.ByteBuffer;

public class SeriesPartitionSlot {
private int deviceGroupId;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deviceGroupId?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed as slotId.

Copy link
Copy Markdown
Member

@wangchao316 wangchao316 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Contributor

@OneSizeFitsQuorum OneSizeFitsQuorum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@qiaojialin qiaojialin merged commit 703a64d into apache:master Apr 11, 2022
xinzhongtianxia pushed a commit to xinzhongtianxia/iotdb that referenced this pull request Apr 11, 2022
…er_meta

* remotes/upstream/master:
  [IOTDB-2687] Base partition policy of data (apache#5464)
  [IOTDB-2868] Construct ExchangeOperator in LocalExecutionPlanner (apache#5466)
  implement serialize and deserialize of SchemaTree (apache#5474)
  [IOTDB-2559][IOTDB-1840][IOTDB-2215][IOTDB-2216] Persistent Schema Management (apache#4732)
  [IOTDB-2876] Definition of common thrift struct (apache#5471)

# Conflicts:
#	server/src/main/java/org/apache/iotdb/db/mpp/common/DataRegion.java
#	server/src/main/java/org/apache/iotdb/db/mpp/sql/planner/LogicalPlanner.java
#	server/src/test/java/org/apache/iotdb/db/mpp/sql/plan/DistributionPlannerTest.java
@CRZbulabula CRZbulabula deleted the base_partition_policy_of_data branch April 27, 2022 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants