Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
HxpSerein committed Jan 22, 2025
1 parent 167e140 commit e1fb761
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1210,7 +1210,7 @@ public TConfigNodeLocation generateLocalConfigNodeLocation() {
new TEndPoint(getInternalAddress(), getConsensusPort()));
}

public boolean getRegionGroupConsistency(TConsensusGroupId regionGroupId) {
public boolean isConsensusGroupStrongConsistency(TConsensusGroupId regionGroupId) {
return (TConsensusGroupType.SchemaRegion.equals(regionGroupId.getType())
&& getSchemaRegionConsensusProtocolClass().equals(ConsensusFactory.RATIS_CONSENSUS))
|| (TConsensusGroupType.DataRegion.equals(regionGroupId.getType())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ private void initRegionGroupHeartbeatCache(
regionReplicaSets.forEach(
regionReplicaSet -> {
TConsensusGroupId regionGroupId = regionReplicaSet.getRegionId();
boolean isStrongConsistency = CONF.getRegionGroupConsistency(regionGroupId);
boolean isStrongConsistency =
CONF.isConsensusGroupStrongConsistency(regionGroupId);
regionGroupCacheMap.put(
regionGroupId,
new RegionGroupCache(
Expand Down Expand Up @@ -284,7 +285,7 @@ public void removeNodeCache(int nodeId) {
*/
public void createRegionGroupHeartbeatCache(
String database, TConsensusGroupId regionGroupId, Set<Integer> dataNodeIds) {
boolean isStrongConsistency = CONF.getRegionGroupConsistency(regionGroupId);
boolean isStrongConsistency = CONF.isConsensusGroupStrongConsistency(regionGroupId);
regionGroupCacheMap.put(
regionGroupId, new RegionGroupCache(database, dataNodeIds, isStrongConsistency));
consensusGroupCacheMap.put(regionGroupId, new ConsensusGroupCache());
Expand Down

0 comments on commit e1fb761

Please sign in to comment.