Skip to content

Commit

Permalink
#1474 -- code style
Browse files Browse the repository at this point in the history
  • Loading branch information
tballison committed Feb 21, 2025
1 parent dac03b9 commit b184f2d
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import com.google.common.io.Resources;
import java.io.IOException;
import java.net.URL;

import org.opensearch.OpenSearchException;
import org.opensearch.action.support.master.AcknowledgedResponse;
import org.opensearch.client.RequestOptions;
Expand All @@ -41,10 +40,11 @@ public static synchronized void checkOrCreateIndex(
final boolean indexExists =
client.indices().exists(new GetIndexRequest(indexName), RequestOptions.DEFAULT);
log.info("Index '{}' exists? {}", indexName, indexExists);
//there's a possible check-then-update race condition
//createIndex intentionally catches and logs exceptions from OpenSearch
// there's a possible check-then-update race condition
// createIndex intentionally catches and logs exceptions from OpenSearch
if (!indexExists) {
boolean created = IndexCreation.createIndex(client, indexName, boltType + ".mapping", log);
boolean created =
IndexCreation.createIndex(client, indexName, boltType + ".mapping", log);
log.info("Index '{}' created? {} using {}", indexName, created, boltType + ".mapping");
}
}
Expand All @@ -58,8 +58,8 @@ public static synchronized void checkOrCreateIndexTemplate(
new IndexTemplatesExistRequest(templateName),
RequestOptions.DEFAULT);
log.info("Template '{}' exists? {}", templateName, templateExists);
//there's a possible check-then-update race condition
//createTemplate intentionally catches and logs exceptions from OpenSearch
// there's a possible check-then-update race condition
// createTemplate intentionally catches and logs exceptions from OpenSearch
if (!templateExists) {
boolean created =
IndexCreation.createTemplate(client, templateName, boltType + ".mapping", log);
Expand Down

0 comments on commit b184f2d

Please sign in to comment.