New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BulkProcessor process every n+1 docs instead of n #4265

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
3 participants
@EvanYellow
Contributor

EvanYellow commented Nov 27, 2013

When you set a BulkProcessor with a bulk actions size of 100, it executes the bulk after 101 documents.

BulkProcessor.builder(client(), listener).setBulkActions(100).setConcurrentRequests(1).setName("foo").build();

Same for size. If you set the bulk size to 1024 bytes, it will actually execute the bulk after 1025 bytes.

This patch fix it.

@dadoonet dadoonet self-assigned this Mar 3, 2014

@dadoonet dadoonet added bug labels Mar 15, 2014

dadoonet added a commit that referenced this pull request Mar 15, 2014

BulkProcessor process every n+1 docs instead of n
When you set a BulkProcessor with a bulk actions size of 100, it executes the bulk after 101 documents.

```java
BulkProcessor.builder(client(), listener).setBulkActions(100).setConcurrentRequests(1).setName("foo").build();
```

Same for size. If you set the bulk size to 1024 bytes, it will actually execute the bulk after 1025 bytes.

This patch fix it.

Closes #4265.
(cherry picked from commit 43b5d91)

@dadoonet dadoonet closed this in 43b5d91 Mar 15, 2014

@dadoonet

This comment has been minimized.

Show comment
Hide comment
@dadoonet

dadoonet Mar 15, 2014

Member

@EvanYellow Thanks! Fix applied as well to BulkSize and test added.

Member

dadoonet commented Mar 15, 2014

@EvanYellow Thanks! Fix applied as well to BulkSize and test added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment