xtern commented on a change in pull request #7941:
URL: https://github.com/apache/ignite/pull/7941#discussion_r478323924



##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/managers/encryption/GridEncryptionManager.java
##########
@@ -811,6 +1124,53 @@ private void 
sendGenerateEncryptionKeyRequest(GenerateEncryptionKeyFuture fut) t
         ctx.io().sendToGridTopic(rndNode.id(), TOPIC_GEN_ENC_KEY, req, 
SYSTEM_POOL);
     }
 
+    /**
+     * @param grpIds Cache group IDs.
+     * @throws IgniteCheckedException If failed.
+     */
+    private void startReencryption(Collection<Integer> grpIds) throws 
IgniteCheckedException {
+        if (pageScanner.disabled())
+            return;
+
+        for (int grpId : grpIds) {
+            IgniteInternalFuture<?> fut = pageScanner.schedule(grpId);
+
+            fut.listen(f -> {
+                try {
+                    f.get();

Review comment:
       What is the reason to change local `try/catch` to multiple  `if/else`?  
Fir me it looks like changing `switch/case` to `if/else`

##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/managers/encryption/GridEncryptionManager.java
##########
@@ -811,6 +1124,53 @@ private void 
sendGenerateEncryptionKeyRequest(GenerateEncryptionKeyFuture fut) t
         ctx.io().sendToGridTopic(rndNode.id(), TOPIC_GEN_ENC_KEY, req, 
SYSTEM_POOL);
     }
 
+    /**
+     * @param grpIds Cache group IDs.
+     * @throws IgniteCheckedException If failed.
+     */
+    private void startReencryption(Collection<Integer> grpIds) throws 
IgniteCheckedException {
+        if (pageScanner.disabled())
+            return;
+
+        for (int grpId : grpIds) {
+            IgniteInternalFuture<?> fut = pageScanner.schedule(grpId);
+
+            fut.listen(f -> {
+                try {
+                    f.get();

Review comment:
       What is the reason to change local `try/catch` to multiple  `if/else`?  
For me it looks like changing `switch/case` to `if/else`




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