zstan commented on a change in pull request #8962:
URL: https://github.com/apache/ignite/pull/8962#discussion_r607520624



##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/managers/indexing/IndexesRebuildTask.java
##########
@@ -38,19 +38,22 @@
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.jetbrains.annotations.Nullable;
 
-import static java.util.Objects.isNull;
-import static java.util.Objects.nonNull;
-
 /**
  * Task that rebuilds indexes.
  */
 public class IndexesRebuildTask {
     /** Index rebuilding futures for caches. Mapping: cacheId -> rebuild 
indexes future. */
     private final Map<Integer, SchemaIndexCacheFuture> idxRebuildFuts = new 
ConcurrentHashMap<>();
 
-    /** Start to rebuild. */
-    public IgniteInternalFuture<?> rebuild(GridCacheContext cctx) {
-        assert nonNull(cctx);
+    /**
+     * Start to rebuild.
+     *
+     * @param cctx Cache context.
+     * @param force Force rebuild indexes.
+     * @return A future of rebuilding cache indexes.
+     */
+    @Nullable public IgniteInternalFuture<?> rebuild(GridCacheContext cctx, 
boolean force) {
+        assert cctx != null;
 
         if (!CU.affinityNode(cctx.localNode(), cctx.config().getNodeFilter()))

Review comment:
       i found that this place of change is not yours, but i suppose that 
return of already completed future and replace @Nullable have huge readability 
impact than increasing @Nullable entropy and further _!= null_ checks, what do 
you think ?




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