Skip to content

Commit

Permalink
[davinci][trivial] Increase log levels for skipped operations in proc…
Browse files Browse the repository at this point in the history
…essConsumerAction (#1156)

[davinci] Increase log levels for skipped state transitions in processConsumerAction

This PR increases the log levels for operations being skipped to bring more attentions for better debugbility.
  • Loading branch information
lluwm committed Sep 5, 2024
1 parent c7cf596 commit ec3ce13
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -359,29 +359,29 @@ protected void processConsumerAction(ConsumerAction message, Store store) throws
* it indicates that Helix has already assigned a new role to this replica (can be leader or follower),
* so quickly skip this state transition and go straight to the final transition.
*/
LOGGER.info(
LOGGER.warn(
"State transition from STANDBY to LEADER is skipped for replica: {}, because Helix has assigned another role to it.",
Utils.getReplicaId(topicName, partition));
return;
}

PartitionConsumptionState partitionConsumptionState = partitionConsumptionStateMap.get(partition);
if (partitionConsumptionState == null) {
LOGGER.info(
LOGGER.warn(
"State transition from STANDBY to LEADER is skipped for replica: {}, because PCS is null and the partition may have been unsubscribed.",
Utils.getReplicaId(topicName, partition));
return;
}

if (partitionConsumptionState.getLeaderFollowerState().equals(LEADER)) {
LOGGER.info(
LOGGER.warn(
"State transition from STANDBY to LEADER is skipped for replica: {} as it is already the partition leader.",
Utils.getReplicaId(topicName, partition));
return;
}
if (store.isMigrationDuplicateStore()) {
partitionConsumptionState.setLeaderFollowerState(PAUSE_TRANSITION_FROM_STANDBY_TO_LEADER);
LOGGER.info(
LOGGER.warn(
"State transition from STANDBY to LEADER is paused for replica: {} as this store is undergoing migration",
partitionConsumptionState.getReplicaId());
} else {
Expand All @@ -400,22 +400,22 @@ protected void processConsumerAction(ConsumerAction message, Store store) throws
* it indicates that Helix has already assigned a new role to this replica (can be leader or follower),
* so quickly skip this state transition and go straight to the final transition.
*/
LOGGER.info(
LOGGER.warn(
"State transition from LEADER to STANDBY is skipped for replica: {}, because Helix has assigned another role to this replica.",
Utils.getReplicaId(topicName, partition));
return;
}

partitionConsumptionState = partitionConsumptionStateMap.get(partition);
if (partitionConsumptionState == null) {
LOGGER.info(
LOGGER.warn(
"State transition from LEADER to STANDBY is skipped for replica: {}, because PCS is null and the partition may have been unsubscribed.",
Utils.getReplicaId(topicName, partition));
return;
}

if (partitionConsumptionState.getLeaderFollowerState().equals(STANDBY)) {
LOGGER.info(
LOGGER.warn(
"State transition from LEADER to STANDBY is skipped for replica: {} as this replica is already a follower.",
partitionConsumptionState.getReplicaId());
return;
Expand Down

0 comments on commit ec3ce13

Please sign in to comment.