Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IGNITE-17002 Control.sh command to schedule index rebuild in Maintenance Mode #10042

Merged
merged 7 commits into from Jun 29, 2022

Conversation

SammyVimes
Copy link
Contributor

@SammyVimes SammyVimes commented May 26, 2022

https://issues.apache.org/jira/browse/IGNITE-17002

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.

Copy link
Contributor

@tkalkirill tkalkirill left a comment

Choose a reason for hiding this comment

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

As far as I understand org.apache.ignite.internal.processors.query.h2.maintenance.RebuildIndexAction is not about planning the rebuilding of indexes, but still about the real rebuilding of indexes, did I understand correctly?

desc,
map,
NODE_ID.argName() + " nodeId",
TARGET + " cacheName1=index1,...indexN"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be better to have two arguments and have them in the following options:

  • --cache-names=cache0,cache1[idx0,idx2]
  • --group-names=grp0,grp1[idx0,idx2]

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 you need group names? Indexes belong to caches, not groups

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, for groups, you can remove the index refinement, the idea is that you need to give the opportunity to rebuild the indexes for all caches in the group.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You can do this, just don't specify any indexes: "(Optional) Specify node for indexes rebuild."

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 would you want to rebuild indexes for all caches in the group? Let's not overcomplicate things

@SammyVimes SammyVimes force-pushed the ignite-17002 branch 2 times, most recently from 3503442 to 4411355 Compare June 25, 2022 15:35
/** */
private Arguments(UUID nodeId, Map<String, Set<String>> cacheToIndexes, Set<String> cacheGroups) {
this.nodeId = nodeId;
this.cacheToIndexes = cacheToIndexes;
Copy link
Contributor

Choose a reason for hiding this comment

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

Defensive copies? This is not executed at 1000 rps

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hm, we'll have to make a deep copy in case of cacheToIndexes. Not sure if it's really necessary here...

* @param cache Cache name.
* @return Indexes of the cache.
*/
private Set<String> indexes(IgniteEx node, String cache) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this code is duplicated. Could we extract it to some util class to avoid duplication?

@rpuch
Copy link
Contributor

rpuch commented Jun 28, 2022

LGTM

@SammyVimes SammyVimes merged commit 1428fda into apache:master Jun 29, 2022
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.

None yet

3 participants