Skip to content

Commit

Permalink
Excluding stats publishing on non-remote store indices
Browse files Browse the repository at this point in the history
Signed-off-by: Shourya Dutta Biswas <114977491+shourya035@users.noreply.github.com>
  • Loading branch information
shourya035 committed Jul 6, 2023
1 parent bb20d64 commit b42912f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4816,7 +4816,7 @@ private boolean localDirectoryContains(Directory localDirectory, String file, lo
}

private void beforeSegmentDownload(RemoteRefreshSegmentTracker downloadStatsTracker, long incomingFileSize) {
if (!isRemoteStoreEnabled()) {
if (!indexSettings.isRemoteStoreEnabled()) {
return;
}
downloadStatsTracker.incrementTotalDownloadsStarted();
Expand All @@ -4828,7 +4828,7 @@ private void afterSegmentDownloadCompleted(
long downloadedFileSize,
long startTimeInNs
) {
if (!isRemoteStoreEnabled()) {
if (!indexSettings.isRemoteStoreEnabled()) {
return;
}
long currentTimeInNs = System.nanoTime();
Expand All @@ -4842,7 +4842,7 @@ private void afterSegmentDownloadCompleted(
}

private void afterSegmentDownloadFailed(RemoteRefreshSegmentTracker downloadStatsTracker, long failedFileSize) {
if (!isRemoteStoreEnabled()) {
if (!indexSettings.isRemoteStoreEnabled()) {
return;
}
downloadStatsTracker.incrementTotalDownloadsFailed();
Expand Down

0 comments on commit b42912f

Please sign in to comment.