Skip to content

Commit fbfd61b

Browse files
lukewhitingszybia
andauthored
Apply suggestions from code review
Co-authored-by: Szymon Bialkowski <[email protected]>
1 parent 1c4225b commit fbfd61b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

server/src/main/java/org/elasticsearch/action/bulk/TransportAbstractBulkAction.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -413,16 +413,16 @@ private void applyPipelinesAndDoInternalExecute(
413413
for (StreamType streamType : enabledStreamTypes) {
414414
for (int i = 0; i < bulkRequest.requests.size(); i++) {
415415
DocWriteRequest<?> req = bulkRequestModifier.bulkRequest.requests.get(i);
416-
String prefix = streamType.getStreamName() + ".";
416+
String StreamTypePrefix = streamType.getStreamName() + ".";
417417

418418
if (req instanceof IndexRequest ir && ir.index().startsWith(prefix) && ir.isPipelineResolved() == false) {
419419
IllegalArgumentException e = new IllegalArgumentException(
420420
"Direct writes to child streams are prohibited. Index directly into the ["
421421
+ streamType.getStreamName()
422422
+ "] stream instead"
423423
);
424-
Boolean failureStore = resolveFailureStore(req.index(), projectMetadata, threadPool.absoluteTimeInMillis());
425-
if (failureStore != null && failureStore) {
424+
Boolean failureStoreEnabled = resolveFailureStore(req.index(), projectMetadata, threadPool.absoluteTimeInMillis());
425+
if (Boolean.TRUE.equals(failureStore)) {
426426
bulkRequestModifier.markItemForFailureStore(i, req.index(), e);
427427
} else {
428428
bulkRequestModifier.markItemAsFailed(i, e, IndexDocFailureStoreStatus.NOT_ENABLED);

0 commit comments

Comments
 (0)