Skip to content

Conversation

@DEADripER
Copy link
Contributor

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 [email protected] or ask anу advice on http://asf.slack.com #ignite channel.

@DEADripER DEADripER changed the title walmode consistency check and tests IGNITE-27473: walmode consistency check and tests Dec 29, 2025
@DEADripER DEADripER changed the title IGNITE-27473: walmode consistency check and tests IGNITE-27473: WALMode consistency check and tests Dec 29, 2025

DataStorageConfiguration dsCfg = ctx.config().getDataStorageConfiguration();

if (dsCfg != null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove curly braces for one line statement.


if (locWalMode != rmtWalMode) {
throw new IgniteCheckedException("WAL mode validation failed. " +
" Local node(locNodeAddrs=" + U.addressesAsString(locNode) +
Copy link
Contributor

@wernerdv wernerdv Jan 12, 2026

Choose a reason for hiding this comment

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

Required indent is 4-space characters, currently it is 8.

WALMode rmtWalMode = n.attribute(ATTR_WAL_MODE);

if (locWalMode != rmtWalMode) {
throw new IgniteCheckedException("WAL mode validation failed. " +
Copy link
Contributor

@wernerdv wernerdv Jan 12, 2026

Choose a reason for hiding this comment

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

I suggest making the error message consistent with existing ones, for example:

                throw new IgniteCheckedException("Remote node has WAL mode different from local " +
                    "[locId8=" + U.id8(locNode.id()) + ", locWalMode=" + locWalMode +
                    ", rmtId8=" + U.id8(n.id()) + ", rmtWalMode=" + rmtWalMode +
                    ", rmtAddrs=" + U.addressesAsString(n) + ", rmtNode=" + U.toShortString(n) + "]");

/**
* Tests for WAL mode consistency validation when nodes join cluster.
*/
public class GridDiscoveryManagerWalModeConsistencyTest extends GridCommonAbstractTest {
Copy link
Contributor

Choose a reason for hiding this comment

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

A test class needs to be added to the suite.

assertEquals(1, ignite0.cluster().nodes().size());
}


Copy link
Contributor

Choose a reason for hiding this comment

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

Remove empty line.

/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName)
.setGridLogger(testLog);
Copy link
Contributor

Choose a reason for hiding this comment

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

It can be placed in one line.

walMode = WALMode.FSYNC;

LogListener walModeErrorLsnr = LogListener.matches("WAL mode validation failed")
.andMatches("LOG_ONLY")
Copy link
Contributor

Choose a reason for hiding this comment

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

Required indent is 4-space characters.

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