Skip to content

Commit c069583

Browse files
committed
minor
1 parent acbf4e4 commit c069583

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ public FileVisitResult postVisitDirectory(Path dir, IOException exc) {
197197

198198
@Override
199199
public Boolean isValid(ProjectId projectId, String databaseFile) {
200-
ProjectMetadata projectMetadata = clusterService.state().metadata().getProject(projectId);
201-
assert projectMetadata != null;
200+
ClusterState currentState = clusterService.state();
201+
ProjectMetadata projectMetadata = currentState.metadata().getProject(projectId);
202202

203203
GeoIpTaskState state = getGeoIpTaskState(projectMetadata, getTaskId(projectId, projectResolver.supportsMultipleProjects()));
204204
if (state == null) {
@@ -211,7 +211,7 @@ public Boolean isValid(ProjectId projectId, String databaseFile) {
211211
return true;
212212
}
213213

214-
boolean valid = metadata.isNewEnough(clusterService.state().metadata().settings());
214+
boolean valid = metadata.isNewEnough(currentState.metadata().settings());
215215
if (valid && metadata.isCloseToExpiration()) {
216216
HeaderWarning.addWarning(
217217
"database [{}] was not updated for over 25 days, geoip processor will stop working if there is no update for 30 days",

0 commit comments

Comments
 (0)