-
Notifications
You must be signed in to change notification settings - Fork 1.9k
IGNITE-8719 #9090
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-8719 #9090
Conversation
...rc/main/java/org/apache/ignite/internal/processors/query/aware/IndexRebuildStateStorage.java
Outdated
Show resolved
Hide resolved
.../core/src/main/java/org/apache/ignite/internal/processors/query/aware/IndexRebuildState.java
Outdated
Show resolved
Hide resolved
.../core/src/main/java/org/apache/ignite/internal/processors/query/aware/IndexRebuildState.java
Outdated
Show resolved
Hide resolved
.../core/src/main/java/org/apache/ignite/internal/processors/query/aware/IndexRebuildState.java
Outdated
Show resolved
Hide resolved
.../core/src/main/java/org/apache/ignite/internal/processors/query/aware/IndexRebuildState.java
Show resolved
Hide resolved
...rc/main/java/org/apache/ignite/internal/processors/query/aware/IndexRebuildStateStorage.java
Outdated
Show resolved
Hide resolved
| assert state != null : cacheName; | ||
|
|
||
| if (state.saved()) | ||
| state.completed(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leakage, i hope ? why u don`t call states.remove here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For in-memory cache, we can immediately delete, for persistent only after the end of the checkpoint.
...rc/main/java/org/apache/ignite/internal/processors/query/aware/IndexRebuildStateStorage.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/apache/ignite/internal/processors/query/aware/IndexRebuildStateStorage.java
Outdated
Show resolved
Hide resolved
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
Outdated
Show resolved
Hide resolved
...e/src/main/java/org/apache/ignite/internal/processors/query/aware/IndexRebuildCacheInfo.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/apache/ignite/internal/processors/query/aware/IndexRebuildStateStorage.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/apache/ignite/internal/processors/query/aware/IndexRebuildStateStorage.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/apache/ignite/internal/processors/query/aware/IndexRebuildStateStorage.java
Outdated
Show resolved
Hide resolved
...rc/test/java/org/apache/ignite/internal/processors/cache/index/AbstractRebuildIndexTest.java
Outdated
Show resolved
Hide resolved
...rc/test/java/org/apache/ignite/internal/processors/cache/index/AbstractRebuildIndexTest.java
Outdated
Show resolved
Hide resolved
| private final GridBusyLock stopNodeLock = new GridBusyLock(); | ||
|
|
||
| /** Current states. Mapping: cache name -> index rebuild state. */ | ||
| private final ConcurrentMap<String, IndexRebuildState> states = new ConcurrentHashMap<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems that states are never cleans ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
states is cleared here:
- IndexRebuildStateStorage#onFinishRebuildIndexes - Using a ConcurrentMap#compute that returns null for non-persistent cache, thereby deletes the entry in the states;
- IndexRebuildStateStorage#afterCheckpointEnd - Uses the same ConcurrentMap#compute, but removes only those with status IndexRebuildState.State#DELETE.
I also added a check to the ResumeRebuildIndexTest#testDeleteIndexRebuildStateOnDestroyCache that the states is cleared.
...rc/main/java/org/apache/ignite/internal/processors/query/aware/IndexRebuildStateStorage.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/apache/ignite/internal/processors/query/aware/IndexRebuildStateStorage.java
Outdated
Show resolved
Hide resolved
…rs/query/aware/IndexRebuildStateStorage.java Co-authored-by: Andrew V. Mashenkov <AMashenkov@users.noreply.github.com>
…rs/query/aware/IndexRebuildStateStorage.java Co-authored-by: Andrew V. Mashenkov <AMashenkov@users.noreply.github.com>
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
The description explains WHAT and WHY was made instead of HOW.
The following pattern must be used:
IGNITE-XXXX Change summarywhereXXXX- number of JIRA issue.(see the Maintainers list)
the
green visaattached 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.