Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ public synchronized boolean updateTo(long requestedVersion) throws Throwable {
return updateTo(new HollowConsumer.VersionInfo(requestedVersion));
}
public synchronized boolean updateTo(HollowConsumer.VersionInfo requestedVersionInfo) throws Throwable {
metrics.setLastRefreshStartNs(System.nanoTime());
long requestedVersion = requestedVersionInfo.getVersion();
if (requestedVersion == getCurrentVersionId()) {
if (requestedVersion == HollowConstants.VERSION_NONE && hollowDataHolderVolatile == null) {
Expand All @@ -128,6 +127,7 @@ public synchronized boolean updateTo(HollowConsumer.VersionInfo requestedVersion
}
return true;
}
metrics.setLastRefreshStartNs(System.nanoTime());

// Take a snapshot of the listeners to ensure additions or removals may occur concurrently
// but will not take effect until a subsequent refresh
Expand Down Expand Up @@ -168,8 +168,10 @@ public synchronized boolean updateTo(HollowConsumer.VersionInfo requestedVersion
&& requestedVersion == HollowConstants.VERSION_LATEST)
throw new IllegalArgumentException("Could not create an update plan, because no existing versions could be retrieved.");

if (updatePlan.destinationVersion(requestedVersion) == getCurrentVersionId())
if (updatePlan.destinationVersion(requestedVersion) == getCurrentVersionId()) {
metrics.setLastRefreshEndNs(System.nanoTime());
return true;
}

if (updatePlan.isSnapshotPlan()) { // 1 snapshot and 0+ delta transitions
HollowDataHolder oldDh = hollowDataHolderVolatile;
Expand Down