Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change noisy logs on SegRep and remote store paths to trace level #9323

Merged
merged 1 commit into from
Aug 15, 2023
Merged
Show file tree
Hide file tree
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 @@ -1641,20 +1641,20 @@ public Tuple<GatedCloseable<SegmentInfos>, ReplicationCheckpoint> getLatestSegme
*/
public boolean isSegmentReplicationAllowed() {
if (indexSettings.isSegRepEnabled() == false) {
logger.warn("Attempting to perform segment replication when it is not enabled on the index");
logger.trace("Attempting to perform segment replication when it is not enabled on the index");
return false;
}
if (getReplicationTracker().isPrimaryMode()) {
logger.warn("Shard is in primary mode and cannot perform segment replication as a replica.");
logger.trace("Shard is in primary mode and cannot perform segment replication as a replica.");
return false;
}
if (this.routingEntry().primary()) {
logger.warn("Shard routing is marked primary thus cannot perform segment replication as replica");
logger.trace("Shard routing is marked primary thus cannot perform segment replication as replica");
return false;
}
if (state().equals(IndexShardState.STARTED) == false
&& (state() == IndexShardState.POST_RECOVERY && shardRouting.state() == ShardRoutingState.INITIALIZING) == false) {
logger.warn(
logger.trace(
() -> new ParameterizedMessage(
"Shard is not started or recovering {} {} and cannot perform segment replication as a replica",
state(),
Expand All @@ -1664,7 +1664,7 @@ public boolean isSegmentReplicationAllowed() {
return false;
}
if (getReplicationEngine().isEmpty()) {
logger.warn(
logger.trace(
dreamer-89 marked this conversation as resolved.
Show resolved Hide resolved
() -> new ParameterizedMessage(
"Shard does not have the correct engine type to perform segment replication {}.",
getEngine().getClass()
Expand Down Expand Up @@ -4815,8 +4815,8 @@ private String copySegmentFiles(
}
}
} finally {
logger.info("Downloaded segments here: {}", downloadedSegments);
logger.info("Skipped download for segments here: {}", skippedSegments);
logger.trace("Downloaded segments here: {}", downloadedSegments);
logger.trace("Skipped download for segments here: {}", skippedSegments);
}
return segmentNFile;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ private boolean shouldSync(boolean didRefresh) {

private boolean syncSegments() {
if (indexShard.getReplicationTracker().isPrimaryMode() == false || indexShard.state() == IndexShardState.CLOSED) {
logger.info(
logger.trace(
"Skipped syncing segments with primaryMode={} indexShardState={}",
indexShard.getReplicationTracker().isPrimaryMode(),
indexShard.state()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public RemoteSegmentMetadata readLatestMetadataFile() throws IOException {
logger.trace("Reading latest Metadata file {}", latestMetadataFile);
remoteSegmentMetadata = readMetadataFile(latestMetadataFile);
} else {
logger.info("No metadata file found, this can happen for new index with no data uploaded to remote segment store");
logger.trace("No metadata file found, this can happen for new index with no data uploaded to remote segment store");
}

return remoteSegmentMetadata;
Expand Down Expand Up @@ -786,7 +786,7 @@ public void deleteStaleSegments(int lastNMetadataFilesToKeep) throws IOException
Integer.MAX_VALUE
);
if (sortedMetadataFileList.size() <= lastNMetadataFilesToKeep) {
logger.info(
logger.trace(
"Number of commits in remote segment store={}, lastNMetadataFilesToKeep={}",
sortedMetadataFileList.size(),
lastNMetadataFilesToKeep
Expand Down Expand Up @@ -849,7 +849,7 @@ public void deleteStaleSegments(int lastNMetadataFilesToKeep) throws IOException
}
});
if (deletionSuccessful.get()) {
logger.info("Deleting stale metadata file {} from remote segment store", metadataFile);
logger.trace("Deleting stale metadata file {} from remote segment store", metadataFile);
remoteMetadataDirectory.deleteFile(metadataFile);
}
}
Expand Down