Skip to content

Commit

Permalink
Merge pull request #4949 from apache/enhance-index-health-check
Browse files Browse the repository at this point in the history
enhance nouveau index health check
  • Loading branch information
rnewson committed Jan 6, 2024
2 parents 99cce48 + e290a3d commit 55844fd
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,12 @@ protected Result check() throws Exception {
final SearchResults searchResults = indexResource.searchIndex(name, searchRequest);
if (searchResults.getTotalHits() == 1) {
return Result.healthy();
} else {
return Result.unhealthy(
"Wrong number of search results, expected 1, got %d", searchResults.getTotalHits());
}
} finally {
indexResource.deletePath(name, null);
}
return Result.unhealthy(name);
}
}

0 comments on commit 55844fd

Please sign in to comment.