Skip to content

Commit

Permalink
[File data visualizer] Removing file upload retries (#123696) (#123725)
Browse files Browse the repository at this point in the history
(cherry picked from commit 3797b78)

# Conflicts:
#	x-pack/plugins/file_upload/server/import_data.ts

Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
jgowdyelastic and kibanamachine authored Feb 4, 2022
1 parent 1099790 commit 15b5cad
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
11 changes: 7 additions & 4 deletions x-pack/plugins/file_upload/server/analyze_file.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ export async function analyzeFile(
overrides: InputOverrides
): Promise<AnalysisResult> {
overrides.explain = overrides.explain === undefined ? 'true' : overrides.explain;
const { body } = await client.asInternalUser.textStructure.findStructure({
body: data,
...overrides,
});
const { body } = await client.asInternalUser.textStructure.findStructure(
{
body: data,
...overrides,
},
{ maxRetries: 0 }
);

const { hasOverrides, reducedOverrides } = formatOverrides(overrides);

Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/file_upload/server/import_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export function importDataProvider({ asCurrentUser }: IScopedClusterClient) {
body.settings = settings;
}

await asCurrentUser.indices.create({ index, body });
await asCurrentUser.indices.create({ index, body }, { maxRetries: 0 });
}

async function indexData(index: string, pipelineId: string, data: InputData) {
Expand All @@ -119,7 +119,7 @@ export function importDataProvider({ asCurrentUser }: IScopedClusterClient) {
settings.pipeline = pipelineId;
}

const { body: resp } = await asCurrentUser.bulk(settings);
const { body: resp } = await asCurrentUser.bulk(settings, { maxRetries: 0 });
if (resp.errors) {
throw resp;
} else {
Expand Down

0 comments on commit 15b5cad

Please sign in to comment.