You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Roman Puchkovskiy (Jira)" <ji...@apache.org> on 2022/11/12 08:20:00 UTC
[jira] [Created] (IGNITE-18139) Fix NPE produced by a call from InternalTableImpl#enlistWithRetry()
Roman Puchkovskiy created IGNITE-18139:
------------------------------------------
Summary: Fix NPE produced by a call from InternalTableImpl#enlistWithRetry()
Key: IGNITE-18139
URL: https://issues.apache.org/jira/browse/IGNITE-18139
Project: Ignite
Issue Type: Bug
Reporter: Roman Puchkovskiy
Assignee: Alexander Lapin
Fix For: 3.0.0-beta2
I'm doing the following:
# Start a cluster of 3 nodes
# Create a table with 3 replicas and 1 partition
# Stop one node
# Make a snapshot on the leader of the partition (twice in a row) - I'm not sure this step is required to reproduce the issue
# Start the stopped node
Then in this code
private <R> CompletableFuture<R> enlistWithRetry(
InternalTransaction tx,
int partId,
BiFunction<TablePartitionId, Long, ReplicaRequest> requestFunction,
int attempts
) {
CompletableFuture<R> result = new CompletableFuture<>();
enlist(partId, tx).<R>thenCompose(
primaryReplicaAndTerm -> {
try {
return replicaSvc.invoke(
primaryReplicaAndTerm.get1(),
requestFunction.apply((TablePartitionId) tx.commitPartition(), primaryReplicaAndTerm.get2())
);
{{primaryReplicaAndTerm}} turns out to contain null as first element, 1 as second element, which causes an NPE further. Probably, {{clusterNodeResolver}} returned null.
This does not reproduce often, but I saw this a few times.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)