Skip to content

Commit

Permalink
[Reporting] don’t wait for refresh when uploading a chunk (elastic#20…
Browse files Browse the repository at this point in the history
…4775)

## Summary

close elastic/kibana-team#1367

We saw significant slowness when uploading large CSV files in
serverless. This PR should speed this up.
Initially wait_for was introduced to reduce test flakiness
elastic#176022 (comment),
but it seems it can be safely removed from uploading stream chunks

Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
Dosant and elasticmachine authored Jan 2, 2025
1 parent a0c94f4 commit 6a84ccc
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
4 changes: 0 additions & 4 deletions x-pack/plugins/reporting/server/lib/content_stream.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,6 @@ describe('ContentStream', () => {
id: expect.any(String),
index: '.kibana-reporting',
op_type: 'create',
refresh: 'wait_for',
body: {
'@timestamp': '1970-01-01T00:00:00.000Z',
parent_id: 'something',
Expand All @@ -317,7 +316,6 @@ describe('ContentStream', () => {
id: expect.any(String),
index: '.kibana-reporting',
op_type: 'create',
refresh: 'wait_for',
body: {
'@timestamp': '1970-01-01T00:00:00.000Z',
parent_id: 'something',
Expand Down Expand Up @@ -348,7 +346,6 @@ describe('ContentStream', () => {
id: expect.any(String),
index: '.kibana-reporting',
op_type: 'create',
refresh: 'wait_for',
body: {
parent_id: 'something',
'@timestamp': '1970-01-01T00:00:00.000Z',
Expand All @@ -365,7 +362,6 @@ describe('ContentStream', () => {
id: expect.any(String),
index: '.kibana-reporting',
op_type: 'create',
refresh: 'wait_for',
body: {
parent_id: 'something',
'@timestamp': '1970-01-01T00:00:00.000Z',
Expand Down
2 changes: 0 additions & 2 deletions x-pack/plugins/reporting/server/lib/content_stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ export class ContentStream extends Duplex {

const body = await this.client.update<ReportSource>({
...this.document,
refresh: 'wait_for',
body: {
doc: {
output: { content },
Expand All @@ -212,7 +211,6 @@ export class ContentStream extends Duplex {
await this.client.index<ChunkSource>({
id,
index: REPORTING_DATA_STREAM_ALIAS,
refresh: 'wait_for',
op_type: 'create',
body: {
parent_id: parentId,
Expand Down

0 comments on commit 6a84ccc

Please sign in to comment.