Skip to content

Commit

Permalink
IGNITE-20429 Code review fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
nizhikov committed Sep 26, 2023
1 parent 25140bf commit 5d3847b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ private PartitionHashRecordV2 caclucateDumpedPartitionHash(Dump dump, String grp
while (iter.hasNext()) {
DumpEntry e = iter.next();

ctx.update(e.key(), e.value(), null, ctx);
ctx.update(e.key(), e.value(), null);

size++;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ public static List<Integer> compareUpdateCounters(
while (it.hasNextX()) {
CacheDataRow row = it.nextX();

ctx.update(row.key(), row.value(), row.version(), ctx);
ctx.update(row.key(), row.value(), row.version());
}

return new PartitionHashRecordV2(
Expand Down Expand Up @@ -389,27 +389,26 @@ public VerifyPartitionContext(HashHolder hash) {
public void update(
KeyCacheObject key,
CacheObject val,
@Nullable GridCacheVersion ver,
VerifyPartitionContext ctx
@Nullable GridCacheVersion ver
) throws IgniteCheckedException {
ctx.partHash += key.hashCode();
partHash += key.hashCode();

if (ver != null)
ctx.partVerHash += ver.hashCode(); // Detects ABA problem.
partVerHash += ver.hashCode(); // Detects ABA problem.

// Object context is not required since the valueBytes have been read directly from page.
ctx.partHash += Arrays.hashCode(val.valueBytes(null));
partHash += Arrays.hashCode(val.valueBytes(null));

if (key.cacheObjectType() == TYPE_BINARY) {
ctx.binary++;
binary++;

if (((BinaryObjectEx)key).isFlagSet(FLAG_COMPACT_FOOTER))
ctx.cf++;
cf++;
else
ctx.noCf++;
noCf++;
}
else
ctx.regular++;
regular++;
}
}
}

0 comments on commit 5d3847b

Please sign in to comment.