Skip to content

Commit

Permalink
GG-19492 Add debug output for o.a.i.internal.processors.cache.persist…
Browse files Browse the repository at this point in the history
…ence.GridCacheOffheapManager#restorePartitionStates method.
  • Loading branch information
6uest committed Jul 4, 2019
1 parent e74ae12 commit 621f6af
Showing 1 changed file with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,8 @@ else if (needSnapshot)
for (int p = 0; p < grp.affinity().partitions(); p++) {
Integer recoverState = partitionRecoveryStates.get(new GroupPartitionId(grp.groupId(), p));

long startTime = U.currentTimeMillis();

if (ctx.pageStore().exists(grp.groupId(), p)) {
ctx.pageStore().ensure(grp.groupId(), p);

Expand Down Expand Up @@ -534,7 +536,8 @@ else if (needSnapshot)
if (log.isDebugEnabled())
log.debug("Restored partition state (from WAL) " +
"[grp=" + grp.cacheOrGroupName() + ", p=" + p + ", state=" + part.state() +
", updCntr=" + part.initialUpdateCounter() + "]");
", updCntr=" + part.initialUpdateCounter() +
", size=" + part.fullSize() + "]");
}
else {
int stateId = (int) io.getPartitionState(pageAddr);
Expand All @@ -544,7 +547,8 @@ else if (needSnapshot)
if (log.isDebugEnabled())
log.debug("Restored partition state (from page memory) " +
"[grp=" + grp.cacheOrGroupName() + ", p=" + p + ", state=" + part.state() +
", updCntr=" + part.initialUpdateCounter() + ", stateId=" + stateId + "]");
", updCntr=" + part.initialUpdateCounter() + ", stateId=" + stateId +
", size=" + part.fullSize() + "]");
}
}
finally {
Expand All @@ -569,13 +573,19 @@ else if (recoverState != null) { // Pre-create partition if having valid state.
if (log.isDebugEnabled())
log.debug("Restored partition state (from WAL) " +
"[grp=" + grp.cacheOrGroupName() + ", p=" + p + ", state=" + part.state() +
", updCntr=" + part.initialUpdateCounter() + "]");
", updCntr=" + part.initialUpdateCounter() +
", size=" + part.fullSize() + "]");
}
else {
if (log.isDebugEnabled())
log.debug("Skipping partition on recovery (no page store OR wal state) " +
"[grp=" + grp.cacheOrGroupName() + ", p=" + p + "]");
}

if (log.isDebugEnabled())
log.debug("Finished restoring partition state " +
"[grp=" + grp.cacheOrGroupName() + ", p=" + p +
", time=" + (U.currentTimeMillis() - startTime) + " ms]");
}

partitionStatesRestored = true;
Expand Down

0 comments on commit 621f6af

Please sign in to comment.