alex-plekhanov commented on a change in pull request #9036:
URL: https://github.com/apache/ignite/pull/9036#discussion_r643897792



##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/managers/encryption/GridEncryptionManager.java
##########
@@ -1113,6 +1113,18 @@ private void releaseWalKeys(long segmentIdx) {
         }
     }
 
+    /** {@inheritDoc} */
+    @Override public void 
onDoneAfterTopologyUnlock(GridDhtPartitionsExchangeFuture fut) {
+        if (fut.activateCluster() || fut.localJoinExchange()) {

Review comment:
       What if the current node joins an inactive cluster?

##########
File path: 
modules/core/src/test/java/org/apache/ignite/internal/encryption/CacheGroupReencryptionTest.java
##########
@@ -631,6 +631,38 @@ public void testReencryptionOnUnstableTopology() throws 
Exception {
         checkGroupKey(CU.cacheId(cache2), INITIAL_KEY_ID + 1, 
MAX_AWAIT_MILLIS);
     }
 
+    /**
+     * @throws Exception If failed.
+     */
+    @Test
+    public void testDeactivation() throws Exception {
+        pageScanRate = 1;
+
+        T2<IgniteEx, IgniteEx> nodes = startTestGrids(true);
+
+        IgniteEx node0 = nodes.get1();
+        IgniteEx node1 = nodes.get2();
+
+        createEncryptedCache(node0, node1, cacheName(), null);
+
+        loadData(100_000);
+
+        
node0.encryption().changeCacheGroupKey(Collections.singleton(cacheName())).get();
+
+        
assertTrue(isReencryptionInProgress(Collections.singleton(cacheName())));
+
+        node0.cluster().state(ClusterState.INACTIVE);
+

Review comment:
       ```
           stopGrid(GRID_1);
           startGrid(GRID_1);
   ```
   Reproduces the problem I've mentioned above




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to