Skip to content

Commit e3a09d1

Browse files
authored
Change DatabaseNodeService error logs to warnings (#138438) (#138518)
1 parent f84b339 commit e3a09d1

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

docs/changelog/138438.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 138438
2+
summary: Change `DatabaseNodeService` error logs to warnings
3+
area: Ingest Node
4+
type: bug
5+
issues: []

modules/ingest-geoip/src/main/java/org/elasticsearch/ingest/geoip/DatabaseNodeService.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ void checkDatabases(ProjectState projectState) {
371371
try {
372372
retrieveAndUpdateDatabase(projectId, name, metadata);
373373
} catch (Exception ex) {
374-
logger.error(() -> "failed to retrieve database [" + name + "]", ex);
374+
logger.warn(() -> "failed to retrieve database [" + name + "]", ex);
375375
}
376376
});
377377

@@ -468,13 +468,13 @@ void retrieveAndUpdateDatabase(ProjectId projectId, String databaseName, GeoIpTa
468468
Files.delete(retrievedFile);
469469
},
470470
failure -> {
471-
logger.error(() -> "failed to retrieve database [" + databaseName + "]", failure);
471+
logger.warn(() -> "failed to retrieve database [" + databaseName + "]", failure);
472472
try {
473473
Files.deleteIfExists(databaseTmpFile);
474474
Files.deleteIfExists(retrievedFile);
475475
} catch (IOException ioe) {
476476
ioe.addSuppressed(failure);
477-
logger.error("unable to delete tmp database file after failure", ioe);
477+
logger.warn("unable to delete tmp database file after failure", ioe);
478478
}
479479
}
480480
);
@@ -519,7 +519,7 @@ void updateDatabase(ProjectId projectId, String databaseFileName, String recorde
519519
}
520520
logger.info("successfully loaded database file [{}]", file.getFileName());
521521
} catch (Exception e) {
522-
logger.error(() -> "failed to update database [" + databaseFileName + "]", e);
522+
logger.warn(() -> "failed to update database [" + databaseFileName + "]", e);
523523
}
524524
}
525525

@@ -533,7 +533,7 @@ void removeStaleEntries(ProjectId projectId, Collection<String> staleEntries) {
533533
assert existing != null;
534534
existing.shutdown(true);
535535
} catch (Exception e) {
536-
logger.error(() -> "failed to clean database [" + staleEntry + "] for project [" + projectId + "]", e);
536+
logger.warn(() -> "failed to clean database [" + staleEntry + "] for project [" + projectId + "]", e);
537537
}
538538
}
539539
}

0 commit comments

Comments
 (0)