Skip to content

Commit

Permalink
[7.x] Fix esArchiver timeout (elastic#31322) (elastic#31342)
Browse files Browse the repository at this point in the history
Backports the following commits to 7.x:
 - Fix esArchiver timeout  (elastic#31322)
  • Loading branch information
Spencer authored Feb 16, 2019
1 parent d7ca8e4 commit eb36a8f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ describe('esArchiver: createIndexDocRecordsStream()', () => {
client.assertNoPendingResponses();
});

it('sends a maximum of 1000 documents at a time', async () => {
const records = createPersonDocRecords(1001);
it('sends a maximum of 300 documents at a time', async () => {
const records = createPersonDocRecords(301);
const stats = createStubStats();
const client = createStubClient([
async (name, params) => {
Expand All @@ -137,7 +137,7 @@ describe('esArchiver: createIndexDocRecordsStream()', () => {
},
async (name, params) => {
expect(name).to.be('bulk');
expect(params.body.length).to.eql(999 * 2);
expect(params.body.length).to.eql(299 * 2);
return { ok: true };
},
async (name, params) => {
Expand Down
2 changes: 1 addition & 1 deletion src/es_archiver/lib/docs/index_doc_records_stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export function createIndexDocRecordsStream(client, stats) {
}

return new Writable({
highWaterMark: 1000,
highWaterMark: 300,
objectMode: true,

async write(record, enc, callback) {
Expand Down

0 comments on commit eb36a8f

Please sign in to comment.