Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
55665f7
Come true all rpc interfaces in the DataNode, and partial features in…
zerolbsony Mar 1, 2026
1fb3ab5
Debugged and verified all key logic in the procedure.
zerolbsony Mar 9, 2026
cb2fd58
Merge remote-tracking branch 'upstream/master' into repair_lost_data_…
zerolbsony Mar 9, 2026
cb5f601
Correct dataPartitionTables and finalDataPartitionTable serialization;
zerolbsony Mar 10, 2026
f19d1d3
Correct heartbeat logic when data partition table is generating;
zerolbsony Mar 10, 2026
49ef823
Use StorageEngine.getInstance().getAllDataRegions() to get Data Parti…
zerolbsony Mar 11, 2026
3960a07
Adjust the default value is 1 min
zerolbsony Mar 11, 2026
98a18c3
Adjust the default value is 1 min
zerolbsony Mar 11, 2026
129610a
Merge remote-tracking branch 'origin/repair_lost_data_partition' into…
zerolbsony Mar 11, 2026
d0882ee
Append a description about the unit
zerolbsony Mar 11, 2026
9a53bd2
use the spotless command to format code
zerolbsony Mar 12, 2026
0448cb0
Avoid writing duplicate values
zerolbsony Mar 12, 2026
2468cf7
Fix bug when get no data partition table in the ConfigNode.
zerolbsony Mar 12, 2026
52e3fde
Add a license description.
zerolbsony Mar 13, 2026
7c7693d
mvn spotless:apply
zerolbsony Mar 13, 2026
5092137
Fix problems based on review opinions
zerolbsony Mar 13, 2026
631a1ea
Remove some unuseful functions
zerolbsony Mar 13, 2026
500a0ae
Find the earliest time slot in the ConfigNode
zerolbsony Mar 16, 2026
9355430
Resolve the problem that data partition table generation is not compl…
zerolbsony Mar 16, 2026
328d85c
Correct need to redirect the target step.
zerolbsony Mar 16, 2026
c6b77a4
Integrate the merge logic into the DataPartitionTable class
zerolbsony Mar 16, 2026
0956e07
Support multiple databases data partition tables are repaired
zerolbsony Mar 17, 2026
62fb277
Fix bugs
zerolbsony Mar 17, 2026
b47f0fb
Fix
zerolbsony Mar 17, 2026
4929a91
Compare startTime between ConfigNode and DataNode, if the larger one …
zerolbsony Mar 17, 2026
6dd58ab
Change to 10 seconds.
zerolbsony Mar 17, 2026
5a652a9
Correct the input parameter name
zerolbsony Mar 17, 2026
83cb061
Changed to the local variable.
zerolbsony Mar 17, 2026
57e8044
Fix all opinions
zerolbsony Mar 17, 2026
617b9ce
spotless code
zerolbsony Mar 17, 2026
b90105b
license
zerolbsony Mar 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ public enum CnToDnSyncRequestType {
DELETE_OLD_REGION_PEER,
RESET_PEER_LIST,

// Data Partition Table Maintenance
COLLECT_EARLIEST_TIMESLOTS,
GENERATE_DATA_PARTITION_TABLE,
GENERATE_DATA_PARTITION_TABLE_HEART_BEAT,

// PartitionCache
INVALIDATE_PARTITION_CACHE,
INVALIDATE_PERMISSION_CACHE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.apache.iotdb.mpp.rpc.thrift.TCreateDataRegionReq;
import org.apache.iotdb.mpp.rpc.thrift.TCreatePeerReq;
import org.apache.iotdb.mpp.rpc.thrift.TCreateSchemaRegionReq;
import org.apache.iotdb.mpp.rpc.thrift.TGenerateDataPartitionTableReq;
import org.apache.iotdb.mpp.rpc.thrift.TInvalidateCacheReq;
import org.apache.iotdb.mpp.rpc.thrift.TInvalidatePermissionCacheReq;
import org.apache.iotdb.mpp.rpc.thrift.TKillQueryInstanceReq;
Expand Down Expand Up @@ -139,6 +140,15 @@ private void buildActionMap() {
actionMapBuilder.put(
CnToDnSyncRequestType.SHOW_APPLIED_CONFIGURATIONS,
(req, client) -> client.showAppliedConfigurations());
actionMapBuilder.put(
CnToDnSyncRequestType.COLLECT_EARLIEST_TIMESLOTS,
(req, client) -> client.getEarliestTimeslots());
actionMapBuilder.put(
CnToDnSyncRequestType.GENERATE_DATA_PARTITION_TABLE,
(req, client) -> client.generateDataPartitionTable((TGenerateDataPartitionTableReq) req));
actionMapBuilder.put(
CnToDnSyncRequestType.GENERATE_DATA_PARTITION_TABLE_HEART_BEAT,
(req, client) -> client.generateDataPartitionTableHeartbeat());
actionMap = actionMapBuilder.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,8 @@ public class ConfigNodeConfig {

private long forceWalPeriodForConfigNodeSimpleInMs = 100;

private long partitionTableRecoverWaitAllDnUpTimeoutInMs = 60000;

public ConfigNodeConfig() {
// empty constructor
}
Expand Down Expand Up @@ -1286,4 +1288,13 @@ public long getFailureDetectorPhiAcceptablePauseInMs() {
public void setFailureDetectorPhiAcceptablePauseInMs(long failureDetectorPhiAcceptablePauseInMs) {
this.failureDetectorPhiAcceptablePauseInMs = failureDetectorPhiAcceptablePauseInMs;
}

public long getPartitionTableRecoverWaitAllDnUpTimeoutInMs() {
return partitionTableRecoverWaitAllDnUpTimeoutInMs;
}

public void setPartitionTableRecoverWaitAllDnUpTimeoutInMs(
long partitionTableRecoverWaitAllDnUpTimeoutInMs) {
this.partitionTableRecoverWaitAllDnUpTimeoutInMs = partitionTableRecoverWaitAllDnUpTimeoutInMs;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,12 @@ private void loadProperties(TrimProperties properties) throws BadNodeUrlExceptio
"failure_detector_phi_acceptable_pause_in_ms",
String.valueOf(conf.getFailureDetectorPhiAcceptablePauseInMs()))));

conf.setPartitionTableRecoverWaitAllDnUpTimeoutInMs(
Long.parseLong(
properties.getProperty(
"partition_table_recover_wait_all_dn_up_timeout",
String.valueOf(conf.getPartitionTableRecoverWaitAllDnUpTimeoutInMs()))));

String leaderDistributionPolicy =
properties.getProperty("leader_distribution_policy", conf.getLeaderDistributionPolicy());
if (AbstractLeaderBalancer.GREEDY_POLICY.equals(leaderDistributionPolicy)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
import org.apache.iotdb.confignode.procedure.impl.node.RemoveAINodeProcedure;
import org.apache.iotdb.confignode.procedure.impl.node.RemoveConfigNodeProcedure;
import org.apache.iotdb.confignode.procedure.impl.node.RemoveDataNodesProcedure;
import org.apache.iotdb.confignode.procedure.impl.partition.DataPartitionTableIntegrityCheckProcedure;
import org.apache.iotdb.confignode.procedure.impl.pipe.plugin.CreatePipePluginProcedure;
import org.apache.iotdb.confignode.procedure.impl.pipe.plugin.DropPipePluginProcedure;
import org.apache.iotdb.confignode.procedure.impl.pipe.runtime.PipeHandleLeaderChangeProcedure;
Expand Down Expand Up @@ -1374,6 +1375,16 @@ public TSStatus createRegionGroups(
}
}

/** Used to repair the lost data partition table */
public TSStatus dataPartitionTableIntegrityCheck() {
DataPartitionTableIntegrityCheckProcedure procedure;
synchronized (this) {
procedure = new DataPartitionTableIntegrityCheckProcedure();
executor.submitProcedure(procedure);
}
return waitingProcedureFinished(procedure);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unnecessarily, ignore

}

/**
* Generate {@link CreateTriggerProcedure} and wait until it finished.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

package org.apache.iotdb.confignode.procedure.impl.partition;

import org.apache.iotdb.confignode.manager.ConfigManager;

/**
* Environment object for ConfigNode procedures. Provides access to ConfigManager and other
* necessary components.
*/
public class ConfigNodeProcedureEnv {

private final ConfigManager configManager;

public ConfigNodeProcedureEnv(ConfigManager configManager) {
this.configManager = configManager;
}

public ConfigManager getConfigManager() {
return configManager;
}
Comment on lines +25 to +38
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ignore

}
Loading
Loading