Skip to content

IGNITE-27678 Same partitions on different nodes can hold different updates if writeThrough is enabled#12666

Open
zstan wants to merge 5 commits intoapache:masterfrom
zstan:ignite-27678
Open

IGNITE-27678 Same partitions on different nodes can hold different updates if writeThrough is enabled#12666
zstan wants to merge 5 commits intoapache:masterfrom
zstan:ignite-27678

Conversation

@zstan
Copy link
Contributor

@zstan zstan commented Jan 28, 2026

Thank you for submitting the pull request to the Apache Ignite.

In order to streamline the review of the contribution
we ask you to ensure the following steps have been taken:

The Contribution Checklist

  • There is a single JIRA ticket related to the pull request.
  • The web-link to the pull request is attached to the JIRA ticket.
  • The JIRA ticket has the Patch Available state.
  • The pull request body describes changes that have been made.
    The description explains WHAT and WHY was made instead of HOW.
  • The pull request title is treated as the final commit message.
    The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
  • A reviewer has been mentioned through the JIRA comments
    (see the Maintainers list)
  • The pull request has been checked by the Teamcity Bot and
    the green visa attached to the JIRA ticket (see TC.Bot: Check PR)

Notes

If you need any help, please email dev@ignite.apache.org or ask anу advice on http://asf.slack.com #ignite channel.

@zstan zstan marked this pull request as ready for review January 28, 2026 10:54
res.add(nodeId);

return res;
return nearNodeId != nodeId ? List.of(nearNodeId, nodeId) : List.of(nearNodeId);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not relates to an issue, just a bit improvement

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure we need no equals()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

* <ul>
* <li>Start 3 node [node0, node1, node2].</li>
* <li>Initialize put operation into transactional cache where [node1] holds primary partition for such insertion.</li>
* <li>Kill [node1] right after tx PREPARE stage is completed (it triggers tx recovery procedure.</li>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor javadoc fix: procedure. -> procedure).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


/** Test scenario:
* <ul>
* <li>Start 3 node [node0, node1, node2].</li>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor javadoc fix: 3 node -> 3 nodes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


/** */
public class IdleVerifyCheckWithWriteThroughTest extends GridCommandHandlerClusterPerMethodAbstractTest {
/** */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/** */ -> /** */

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

if (withPersistence)
cleanPersistenceDir();

err = new AtomicReference<>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we initialize all there fields with their declarations.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no we can`t because they are static and need to reinitialize before each test call

});

MapCacheStoreStrategy strategy = new MapCacheStoreStrategy();
strategy.resetStore();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to reset at start?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

public static Boolean failOnSessionStart;

/** */
@Parameterized.Parameters(name = "cmdHnd={0}, withPersistence={1}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and , failOnSessionStart={2} ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, thanks

res.add(nodeId);

return res;
return nearNodeId != nodeId ? List.of(nearNodeId, nodeId) : List.of(nearNodeId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure we need no equals()?

}
}
catch (RuntimeException e) {
U.error(log, "Exception raised during notify SessionListeners: ", e);
Copy link
Contributor

@Vladsz83 Vladsz83 Feb 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: notify SessionListeners: -> notifying cache store session listeners.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

protected boolean alwaysKeepBinary;

/** Failure handler reaction. */
private Consumer<Throwable> failureHandlerAction;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets make an abbreviation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need abbr if it correctly passed through check style ? Upper i see no abbr, also i think that abbr make it less readable.

GridKernalContext ctx = igniteContext();
CacheConfiguration cfg = cacheConfiguration();

failureHandlerAction = e -> ctx.failure().process(new FailureContext(FailureType.CRITICAL_ERROR, e));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should check if(sesLsnrs!=null). No need to worry user if there are no cache store session listeners.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

private static CountDownLatch nodeKill;

/** Tx message flag. */
private static volatile boolean finalTxMsgPassed;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it used in static class

private static volatile boolean finalTxMsgPassed;

/** Session method flag. */
private static AtomicBoolean sessionTriggered = new AtomicBoolean();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer to store as is.

}
}
catch (RuntimeException e) {
U.error(log, "Exception raised during sessionEnd: ", e);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make the massage more user-friendly. What does it mean, what are the issues?

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 2, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
4 New Code Smells (required ≤ 1)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants