Skip to content

IGNITE-27030 Add force flag for rolling upgrade#12513

Merged
timoninmaxim merged 8 commits intoapache:masterfrom
chesnokoff:ignite-27030
Nov 13, 2025
Merged

IGNITE-27030 Add force flag for rolling upgrade#12513
timoninmaxim merged 8 commits intoapache:masterfrom
chesnokoff:ignite-27030

Conversation

@chesnokoff
Copy link
Copy Markdown
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 dev@ignite.apache.org or ask anу advice on http://asf.slack.com #ignite channel.

Comment on lines -284 to -293
private boolean checkVersionsForEnabling(IgniteProductVersion cur, IgniteProductVersion target) throws IgniteCheckedException {
IgnitePair<IgniteProductVersion> oldVerPair = rollUpVers;
if (oldVerPair != null) {
if (oldVerPair.get1().equals(cur) && oldVerPair.get2().equals(target))
return false;

throw new IgniteCheckedException("Rolling upgrade is already enabled with a different current and target version: " +
oldVerPair.get1() + " , " + oldVerPair.get2());
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

move this out of checkVersionsForEnabling

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

for which reason?

String targetVerStr = curVer.major() + "." + (curVer.minor() + 1) + "." + (curVer.maintenance() + 1);
IgniteProductVersion targetVer = IgniteProductVersion.fromString(targetVerStr);

execute(ROLLING_UPGRADE, ENABLE, targetVerStr, FORCE);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's check it failed without this flag


Parameters:
target_version - Target Ignite version. The target version can be one minor higher if its maintenance version is zero, or one maintenance version higher (e.g. 2.18.0 -> 2.18.1 or 2.18.1 -> 2.19.0).
--force - Enable rolling upgrade without target version checks.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Add a warning, like "do not use without good reason" or smth

* @param target Target version.
* @see #enable(IgniteProductVersion, boolean)
*/
public void enable(IgniteProductVersion target) throws IgniteCheckedException {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No need in this method

Comment on lines -284 to -293
private boolean checkVersionsForEnabling(IgniteProductVersion cur, IgniteProductVersion target) throws IgniteCheckedException {
IgnitePair<IgniteProductVersion> oldVerPair = rollUpVers;
if (oldVerPair != null) {
if (oldVerPair.get1().equals(cur) && oldVerPair.get2().equals(target))
return false;

throw new IgniteCheckedException("Rolling upgrade is already enabled with a different current and target version: " +
oldVerPair.get1() + " , " + oldVerPair.get2());
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

for which reason?

}

if (force)
return true;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's add log here that we skip checking versions due to force flag

@sonarqubecloud
Copy link
Copy Markdown

@timoninmaxim timoninmaxim merged commit b20fe87 into apache:master Nov 13, 2025
9 checks passed
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