Skip to content

Commit

Permalink
use rollover API
Browse files Browse the repository at this point in the history
  • Loading branch information
hop-dev committed Mar 7, 2022
1 parent bbd8730 commit 65cec55
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -477,10 +477,8 @@ const getTemplateWithNameEndingIn = (composedOfTemplates: TemplateMap, suffix: s
const rolloverDataStream = (dataStreamName: string, esClient: ElasticsearchClient) => {
try {
// Do no wrap rollovers in retryTransientEsErrors since it is not idempotent
const path = `/${dataStreamName}/_rollover`;
return esClient.transport.request({
method: 'POST',
path,
return esClient.indices.rollover({
alias: dataStreamName,
});
} catch (error) {
throw new Error(`cannot rollover data stream ${dataStreamName} - ${error}`);
Expand Down

0 comments on commit 65cec55

Please sign in to comment.