[Reporting] don’t wait for refresh when uploading a chunk (#204775)

## Summary

close https://github.com/elastic/kibana-team/issues/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
https://github.com/elastic/kibana/pull/176022#discussion_r1511001636,
but it seems it can be safely removed from uploading stream chunks

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
Anton Dosov 2025-01-02 18:45:08 +01:00 committed by GitHub
parent a0c94f433a
commit 6a84cccbde
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 0 additions and 6 deletions

View file

@ -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',
@ -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',
@ -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',
@ -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',

View file

@ -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 },
@ -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,