tkalkirill commented on a change in pull request #9207:
URL: https://github.com/apache/ignite/pull/9207#discussion_r676530046
##########
File path:
modules/core/src/main/java/org/apache/ignite/internal/cache/query/index/sorted/inline/InlineIndexImpl.java
##########
@@ -422,61 +421,37 @@ private static boolean isExpired(IndexRow row) {
private final AtomicBoolean destroyed = new AtomicBoolean();
/** {@inheritDoc} */
- @Override public void destroy(boolean softDelete) {
+ @Override public void destroy(boolean softDel) {
// Already destroyed.
if (!destroyed.compareAndSet(false, true))
return;
- try {
- if (cctx.affinityNode() && !softDelete) {
- List<Long> rootPages = new ArrayList<>(segments.length);
- List<InlineIndexTree> trees = new ArrayList<>(segments.length);
-
- cctx.shared().database().checkpointReadLock();
-
- try {
- for (int i = 0; i < segments.length; i++) {
- InlineIndexTree tree = segments[i];
-
- // Just mark it as destroyed. Actual destroy later in
background task.
- tree.markDestroyed();
+ if (cctx.affinityNode() && !softDel) {
+ for (InlineIndexTree segment : segments)
+ segment.markDestroyed();
- rootPages.add(tree.getMetaPageId());
- trees.add(tree);
-
- dropMetaPage(i);
- }
- }
- finally {
- cctx.shared().database().checkpointReadUnlock();
- }
-
-
cctx.kernalContext().metric().remove(stats.metricRegistryName());
+ cctx.kernalContext().metric().remove(stats.metricRegistryName());
+ if (cctx.group().persistenceEnabled() ||
+ cctx.shared().kernalContext().state().clusterState().state()
!= INACTIVE) {
Review comment:
When the cluster is deactivated, then we stop the caches, for the case
in-memory, we add tasks to delete indexes, which should not happen, because
after activation there will be no data.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]