sk0x50 commented on a change in pull request #7613: IGNITE-12821 Add check size 
into validate_indexes
URL: https://github.com/apache/ignite/pull/7613#discussion_r407258745
 
 

 ##########
 File path: 
modules/indexing/src/main/java/org/apache/ignite/internal/visor/verify/ValidateIndexesClosure.java
 ##########
 @@ -206,53 +230,55 @@ private VisorValidateIndexesJobResult call0() {
 
         List<Future<Map<PartitionKey, ValidateIndexesPartitionResult>>> 
procPartFutures = new ArrayList<>();
         List<Future<Map<String, ValidateIndexesPartitionResult>>> 
procIdxFutures = new ArrayList<>();
+        List<T3<CacheGroupContext, GridDhtLocalPartition, Future<CacheSize>>> 
cacheSizeFutures = new ArrayList<>();
+        List<T3<GridCacheContext, Index, Future<T2<Throwable, Long>>>> 
idxSizeFutures = new ArrayList<>();
+
         List<T2<CacheGroupContext, GridDhtLocalPartition>> partArgs = new 
ArrayList<>();
         List<T2<GridCacheContext, Index>> idxArgs = new ArrayList<>();
 
         totalCacheGrps = grpIds.size();
 
         Map<Integer, IndexIntegrityCheckIssue> integrityCheckResults = 
integrityCheckIndexesPartitions(grpIds);
 
+        GridQueryProcessor qryProcessor = ignite.context().query();
+        IgniteH2Indexing h2Indexing = 
(IgniteH2Indexing)qryProcessor.getIndexing();
+
         for (Integer grpId : grpIds) {
             CacheGroupContext grpCtx = 
ignite.context().cache().cacheGroup(grpId);
 
-            if (grpCtx == null || integrityCheckResults.containsKey(grpId))
+            if (isNull(grpCtx) || integrityCheckResults.containsKey(grpId))
 
 Review comment:
   This is arguable of course, but I see no benefit from using *isNull* instead 
of *== null*.
   Moreover, the javadoc states the following:
   
   > @apiNote This method exists to be used as a {@link 
java.util.function.Predicate}, {@code filter(Objects::isNull)}

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to