Skip to content

Commit

Permalink
Fixed es export: ignore_unavailable should be set in PIT (#190)
Browse files Browse the repository at this point in the history
* Fixed PIT no index found error

* Removed duplicate option in es export
  • Loading branch information
SchawnnDev authored Jun 4, 2024
1 parent bcaba6e commit 2c87b96
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internals/export/elasticsearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ func (export StreamedExport) ProcessStreamedExport(ctx context.Context, params E
}

// handle pit creation
pit, err := cli.OpenPointInTime(params.Indices).KeepAlive("5m").Do(context.Background())
pit, err := cli.OpenPointInTime(params.Indices).
IgnoreUnavailable(params.IgnoreUnavailable).
KeepAlive("5m").Do(context.Background())
if err != nil {
zap.L().Error("OpenPointInTime failed", zap.Error(err))
return err
Expand Down Expand Up @@ -159,7 +161,6 @@ func (export StreamedExport) ProcessStreamedExport(ctx context.Context, params E
response, err := cli.Search().
Request(params.SearchRequest).
Size(size).
IgnoreUnavailable(params.IgnoreUnavailable).
AllowNoIndices(params.AllowNoIndices).
Do(context.Background())
if err != nil {
Expand Down

0 comments on commit 2c87b96

Please sign in to comment.