Skip to content

Commit 621f6af

Browse files
committed
GG-19492 Add debug output for o.a.i.internal.processors.cache.persistence.GridCacheOffheapManager#restorePartitionStates method.
1 parent e74ae12 commit 621f6af

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,8 @@ else if (needSnapshot)
490490
for (int p = 0; p < grp.affinity().partitions(); p++) {
491491
Integer recoverState = partitionRecoveryStates.get(new GroupPartitionId(grp.groupId(), p));
492492

493+
long startTime = U.currentTimeMillis();
494+
493495
if (ctx.pageStore().exists(grp.groupId(), p)) {
494496
ctx.pageStore().ensure(grp.groupId(), p);
495497

@@ -534,7 +536,8 @@ else if (needSnapshot)
534536
if (log.isDebugEnabled())
535537
log.debug("Restored partition state (from WAL) " +
536538
"[grp=" + grp.cacheOrGroupName() + ", p=" + p + ", state=" + part.state() +
537-
", updCntr=" + part.initialUpdateCounter() + "]");
539+
", updCntr=" + part.initialUpdateCounter() +
540+
", size=" + part.fullSize() + "]");
538541
}
539542
else {
540543
int stateId = (int) io.getPartitionState(pageAddr);
@@ -544,7 +547,8 @@ else if (needSnapshot)
544547
if (log.isDebugEnabled())
545548
log.debug("Restored partition state (from page memory) " +
546549
"[grp=" + grp.cacheOrGroupName() + ", p=" + p + ", state=" + part.state() +
547-
", updCntr=" + part.initialUpdateCounter() + ", stateId=" + stateId + "]");
550+
", updCntr=" + part.initialUpdateCounter() + ", stateId=" + stateId +
551+
", size=" + part.fullSize() + "]");
548552
}
549553
}
550554
finally {
@@ -569,13 +573,19 @@ else if (recoverState != null) { // Pre-create partition if having valid state.
569573
if (log.isDebugEnabled())
570574
log.debug("Restored partition state (from WAL) " +
571575
"[grp=" + grp.cacheOrGroupName() + ", p=" + p + ", state=" + part.state() +
572-
", updCntr=" + part.initialUpdateCounter() + "]");
576+
", updCntr=" + part.initialUpdateCounter() +
577+
", size=" + part.fullSize() + "]");
573578
}
574579
else {
575580
if (log.isDebugEnabled())
576581
log.debug("Skipping partition on recovery (no page store OR wal state) " +
577582
"[grp=" + grp.cacheOrGroupName() + ", p=" + p + "]");
578583
}
584+
585+
if (log.isDebugEnabled())
586+
log.debug("Finished restoring partition state " +
587+
"[grp=" + grp.cacheOrGroupName() + ", p=" + p +
588+
", time=" + (U.currentTimeMillis() - startTime) + " ms]");
579589
}
580590

581591
partitionStatesRestored = true;

0 commit comments

Comments
 (0)