This is an automated email from the ASF dual-hosted git repository.
fortino pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
The following commit(s) were added to refs/heads/trunk by this push:
new 7be9852aa2 OAK-10456: log index name when bulk update fails (#1132)
7be9852aa2 is described below
commit 7be9852aa2533fa237869cdc35e113f2594a6d09
Author: Fabrizio Fortino <[email protected]>
AuthorDate: Tue Sep 26 11:59:46 2023 +0200
OAK-10456: log index name when bulk update fails (#1132)
* OAK-10456: log index name when bulk update fails
* OAK-10456: minor code improvement
---
.../plugins/index/elastic/index/ElasticBulkProcessorHandler.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git
a/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/index/ElasticBulkProcessorHandler.java
b/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/index/ElasticBulkProcessorHandler.java
index 98d8249b4b..035fd7b6c8 100644
---
a/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/index/ElasticBulkProcessorHandler.java
+++
b/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/index/ElasticBulkProcessorHandler.java
@@ -156,7 +156,7 @@ class ElasticBulkProcessorHandler {
}
private void checkFailures() throws IOException {
- if (suppressedExceptions.size() > 0) {
+ if (!suppressedExceptions.isEmpty()) {
IOException ioe = new IOException("Exception while indexing. See
suppressed for details");
suppressedExceptions.forEach(ioe::addSuppressed);
throw ioe;
@@ -263,8 +263,9 @@ class ElasticBulkProcessorHandler {
isFailedDocSetFull = true;
}
// Log entry to be used to parse logs to get the
failed doc id/path if needed
- LOG.error("ElasticIndex Update Doc Failure: Error
while adding/updating doc with id : [{}]", bulkItemResponse.getId());
- LOG.error("Failure Details: BulkItem ID: " +
failure.getId() + ", Failure Cause: {}", failure.getCause());
+ LOG.error("ElasticIndex Update Doc Failure: Error
while adding/updating doc with id: [{}]", bulkItemResponse.getId());
+ LOG.error("Failure Details: BulkItem ID: {}, Index:
{}, Failure Cause: {}",
+ failure.getId(), failure.getIndex(),
failure.getCause());
} else if (!hasSuccesses) {
// Set indexUpdated to true even if 1 item was updated
successfully
updatesMap.put(executionId, Boolean.TRUE);