Skip to content
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 from

Conversation

EvanYellow
Copy link
Contributor

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 pushed a commit that referenced this pull request Mar 15, 2014
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
Copy link
Member

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

@clintongormley clintongormley added the :Core/Infra/Transport API Transport client API label Jun 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants