[ 
https://issues.apache.org/jira/browse/IGNITE-24164?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksandr Polovtsev updated IGNITE-24164:
-----------------------------------------
    Description: 
We have the following debug log in PartitionReplicaListener:


{code:java}
// run update of raft configuration if this node is a leader
LOG.debug("Current node={} is the leader of partition raft group={}. "
                + "Initiate rebalance process for partition={}, table={}",
        leaderWithTerm.leader(),
        replicaGrpId,
        replicaGrpId.partitionId(),
        catalogService.table(replicaGrpId.tableId(), 
catalogService.latestCatalogVersion()).name()
);
{code}

There are two issues with this:
1. We are using the latest catalog version for some reason, the table may not 
exist anymore and we will get an NPE;
2. We are doing non trivial calculations for debug logging.

> Don't use catalog in debug logging in PartitionReplicaListener
> --------------------------------------------------------------
>
>                 Key: IGNITE-24164
>                 URL: https://issues.apache.org/jira/browse/IGNITE-24164
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Aleksandr Polovtsev
>            Assignee: Aleksandr Polovtsev
>            Priority: Major
>              Labels: ignite-3
>
> We have the following debug log in PartitionReplicaListener:
> {code:java}
> // run update of raft configuration if this node is a leader
> LOG.debug("Current node={} is the leader of partition raft group={}. "
>                 + "Initiate rebalance process for partition={}, table={}",
>         leaderWithTerm.leader(),
>         replicaGrpId,
>         replicaGrpId.partitionId(),
>         catalogService.table(replicaGrpId.tableId(), 
> catalogService.latestCatalogVersion()).name()
> );
> {code}
> There are two issues with this:
> 1. We are using the latest catalog version for some reason, the table may not 
> exist anymore and we will get an NPE;
> 2. We are doing non trivial calculations for debug logging.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to