Skip to content

[7.1] Add sleep to allow ES sufficient time for CCR (#11172)#12437

Merged
ycombinator merged 2 commits intoelastic:7.1from
ycombinator:backport/7.1/pr-11172
Jun 6, 2019
Merged

[7.1] Add sleep to allow ES sufficient time for CCR (#11172)#12437
ycombinator merged 2 commits intoelastic:7.1from
ycombinator:backport/7.1/pr-11172

Conversation

@ycombinator
Copy link
Copy Markdown
Contributor

Backports the following commits to 7.1:

After repeatedly running the Elasticsearch module integration test in Metricbeat, I found that sometimes Elasticsearch doesn't get enough time to perform CCR and generate CCR stats. This causes the following error, but only some times:

```
--- FAIL: TestFetch (2.44s)
    --- FAIL: TestFetch/ccr (0.08s)
        elasticsearch_integration_test.go:92:
                Error Trace:    elasticsearch_integration_test.go:92
                Error:          Should NOT be empty, but was []
                Test:           TestFetch/ccr
```

So this PR adds a 300ms sleep to give Elasticsearch enough time to perform CCR and generate CCR stats. After testing various sleep durations, I found that 300ms seemed to be the lowest (round) value I could use that consistently passed this test.

Possibly related: #10866
@ycombinator ycombinator merged commit 31ddac1 into elastic:7.1 Jun 6, 2019
@ycombinator ycombinator deleted the backport/7.1/pr-11172 branch December 25, 2019 11:18
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
…lastic#12437)

* Add sleep to allow ES sufficient time for CCR (elastic#11172)

After repeatedly running the Elasticsearch module integration test in Metricbeat, I found that sometimes Elasticsearch doesn't get enough time to perform CCR and generate CCR stats. This causes the following error, but only some times:

```
--- FAIL: TestFetch (2.44s)
    --- FAIL: TestFetch/ccr (0.08s)
        elasticsearch_integration_test.go:92:
                Error Trace:    elasticsearch_integration_test.go:92
                Error:          Should NOT be empty, but was []
                Test:           TestFetch/ccr
```

So this PR adds a 300ms sleep to give Elasticsearch enough time to perform CCR and generate CCR stats. After testing various sleep durations, I found that 300ms seemed to be the lowest (round) value I could use that consistently passed this test.

Possibly related: elastic#10866

* Fixing formatting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants