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_r407256671
########## File path: modules/core/src/main/java/org/apache/ignite/internal/visor/verify/VisorValidateIndexesJobResult.java ########## @@ -86,41 +100,58 @@ public VisorValidateIndexesJobResult() { * @return Results of reverse indexes validation from node. */ public Map<String, ValidateIndexesPartitionResult> indexResult() { - return idxRes == null ? Collections.emptyMap() : idxRes; + return idxRes == null ? emptyMap() : idxRes; } /** * @return Collection of failed integrity checks. */ public Collection<IndexIntegrityCheckIssue> integrityCheckFailures() { - return integrityCheckFailures == null ? Collections.emptyList() : integrityCheckFailures; + return integrityCheckFailures == null ? emptyList() : integrityCheckFailures; + } + + /** + * Return results of checking size cache and index. + * + * @return Results of checking size cache and index. + */ + public Map<String, ValidateIndexesCheckSizeResult> checkSizeResult() { + return checkSizeRes == null ? emptyMap() : checkSizeRes; } /** * @return {@code true} If any indexes issues found on node, otherwise returns {@code false}. */ public boolean hasIssues() { return (integrityCheckFailures != null && !integrityCheckFailures.isEmpty()) || - (partRes != null && partRes.entrySet().stream().anyMatch(e -> !e.getValue().issues().isEmpty())) || - (idxRes != null && idxRes.entrySet().stream().anyMatch(e -> !e.getValue().issues().isEmpty())); + (partRes != null && partRes.entrySet().stream().anyMatch(e -> !e.getValue().issues().isEmpty())) || + (idxRes != null && idxRes.entrySet().stream().anyMatch(e -> !e.getValue().issues().isEmpty())) || + (checkSizeRes != null && checkSizeRes.entrySet().stream().anyMatch(e -> !e.getValue().issues().isEmpty())); } /** {@inheritDoc} */ @Override protected void writeExternalData(ObjectOutput out) throws IOException { - U.writeMap(out, partRes); - U.writeMap(out, idxRes); - U.writeCollection(out, integrityCheckFailures); + writeMap(out, partRes); + writeMap(out, idxRes); + writeCollection(out, integrityCheckFailures); + writeMap(out, checkSizeRes); } /** {@inheritDoc} */ - @Override protected void readExternalData(byte protoVer, ObjectInput in) throws IOException, ClassNotFoundException { - partRes = U.readMap(in); + @Override protected void readExternalData( + byte protoVer, + ObjectInput in + ) throws IOException, ClassNotFoundException { + partRes = readMap(in); if (protoVer >= V2) - idxRes = U.readMap(in); + idxRes = readMap(in); if (protoVer >= V3) - integrityCheckFailures = U.readCollection(in); + integrityCheckFailures = readCollection(in); + + if (protoVer >= V4) Review comment: Well, Apache Ignite does not support the rolling upgrade feature, so there is no reason for *V4* and so on. ---------------------------------------------------------------- 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