public void reBalanceDataPartitionPolicy(String database) {
    try {
      DataPartitionPolicyTable dataPartitionPolicyTable =
          dataPartitionPolicyTableMap.computeIfAbsent(
              database, empty -> new DataPartitionPolicyTable());

      dataPartitionPolicyTable.acquireLock();
      try {
        dataPartitionPolicyTable.reBalanceDataPartitionPolicy(
            getPartitionManager().getAllRegionGroupIds(database, TConsensusGroupType.DataRegion));
        dataPartitionPolicyTable.logDataAllotTable(database);
      } finally {
        dataPartitionPolicyTable.releaseLock();
      }

    } catch (DatabaseNotExistsException e) {
      LOGGER.error("Database {} not exists when updateDataAllotTable", database);
    }
  }
Re-balance the DataPartitionPolicyTable.

@param database Database name
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/PartitionBalancer.java