fabriziofortino commented on code in PR #870:
URL: https://github.com/apache/jackrabbit-oak/pull/870#discussion_r1131215373


##########
oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/index/ElasticBulkProcessorHandler.java:
##########
@@ -64,13 +64,13 @@ class ElasticBulkProcessorHandler {
         Integer.getInteger("oak.indexer.elastic.bulkProcessorConcurrency", 1);
     private static final String SYNC_MODE_PROPERTY = "sync-mode";
     private static final String SYNC_RT_MODE = "rt";
-    private static boolean waitForESAcknowledgement = true;
 
     protected final ElasticConnection elasticConnection;
     protected final String indexName;
     protected final ElasticIndexDefinition indexDefinition;
     private final NodeBuilder definitionBuilder;
     protected final BulkProcessor bulkProcessor;
+    private boolean waitForESAcknowledgement;

Review Comment:
   make it final



##########
oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/index/ElasticBulkProcessorHandler.java:
##########
@@ -96,11 +96,13 @@ class ElasticBulkProcessorHandler {
     private ElasticBulkProcessorHandler(@NotNull ElasticConnection 
elasticConnection,
                                         @NotNull String indexName,
                                         @NotNull ElasticIndexDefinition 
indexDefinition,
-                                        @NotNull NodeBuilder 
definitionBuilder) {
+                                        @NotNull NodeBuilder definitionBuilder,
+                                        @NotNull boolean 
waitForESAcknowledgement) {

Review Comment:
   primitive should not be annotated with `@NotNull`: remove the annotationor 
use Boolean



##########
oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/index/ElasticBulkProcessorHandler.java:
##########
@@ -113,20 +115,12 @@ private ElasticBulkProcessorHandler(@NotNull 
ElasticConnection elasticConnection
     public static ElasticBulkProcessorHandler getBulkProcessorHandler(@NotNull 
ElasticConnection elasticConnection,
                                                                       @NotNull 
String indexName,
                                                                       @NotNull 
ElasticIndexDefinition indexDefinition,
-                                                                      @NotNull 
NodeBuilder definitionBuilder, CommitInfo commitInfo) {
+                                                                      @NotNull 
NodeBuilder definitionBuilder, CommitInfo commitInfo,
+                                                                      @NotNull 
boolean waitForESAcknowledgement) {

Review Comment:
   see above comment on annotation for primitives



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to