Skip to content

Commit

Permalink
Added a log about the first leaf response received by the learner
Browse files Browse the repository at this point in the history
Signed-off-by: Artem Ananev <[email protected]>
  • Loading branch information
artemananiev committed Aug 24, 2024
1 parent f6c8ca4 commit 924aaa2
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package com.swirlds.virtualmap.internal.reconnect;

import static com.swirlds.logging.legacy.LogMarker.RECONNECT;
import static com.swirlds.virtualmap.internal.Path.ROOT_PATH;

import com.swirlds.common.crypto.CryptographyHolder;
Expand Down Expand Up @@ -51,6 +52,8 @@
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Consumer;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

/**
* An implementation of {@link LearnerTreeView} for the virtual merkle. The learner during reconnect
Expand All @@ -69,6 +72,8 @@
public final class LearnerPullVirtualTreeView<K extends VirtualKey, V extends VirtualValue>
extends VirtualTreeViewBase<K, V> implements LearnerTreeView<Long> {

private static final Logger logger = LogManager.getLogger(LearnerPullVirtualTreeView.class);

/**
* A stashed null hash, which is used for any leaves which are null that we need to send
* (specifically, leaf 2 for a tree with only a single leaf).
Expand Down Expand Up @@ -312,6 +317,7 @@ private void handleResponse(final PullVirtualTreeResponse response) {

if (isLeaf) {
if (firstLeaf) {
logger.info(RECONNECT.getMarker(), "First leaf response received, view={}", viewId);
root.prepareForFirstLeaf();
firstLeaf = false;
}
Expand Down

0 comments on commit 924aaa2

Please sign in to comment.