Github user tnine commented on a diff in the pull request:
https://github.com/apache/incubator-usergrid/pull/161#discussion_r25295292
--- Diff:
stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexBatchImpl.java
---
@@ -87,41 +86,34 @@
private final IndexIdentifier.IndexAlias alias;
private final IndexIdentifier indexIdentifier;
- private BulkRequestBuilder bulkRequest;
-
- private final int autoFlushSize;
-
- private int count;
-
+ private final IndexBatchBuffer indexBatchBuffer;
private final FailureMonitor failureMonitor;
private final AliasedEntityIndex entityIndex;
+ private final ConcurrentLinkedQueue<BetterFuture> promises;
- public EsEntityIndexBatchImpl( final ApplicationScope
applicationScope, final Client client,
- final IndexFig config, final int autoFlushSize, final
FailureMonitor failureMonitor, final AliasedEntityIndex entityIndex ) {
+ public EsEntityIndexBatchImpl(final ApplicationScope applicationScope,
final Client client,final IndexBatchBuffer indexBatchBuffer,
+ final IndexFig config, final FailureMonitor failureMonitor,
final AliasedEntityIndex entityIndex ) {
this.applicationScope = applicationScope;
this.client = client;
+ this.indexBatchBuffer = indexBatchBuffer;
this.failureMonitor = failureMonitor;
this.entityIndex = entityIndex;
this.indexIdentifier = IndexingUtils.createIndexIdentifier(config,
applicationScope);
this.alias = indexIdentifier.getAlias();
this.refresh = config.isForcedRefresh();
- this.autoFlushSize = autoFlushSize;
- initBatch();
+ this.promises = new ConcurrentLinkedQueue<>();
--- End diff --
Do we want to set an upper bound on this in case we can't flush fast enough?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---