Skip to content

Conversation

@axw
Copy link
Member

@axw axw commented Jul 9, 2021

  • perform cheaper bool checks before synchronisation methods
  • don't issue original request if product check fails
  • check original request error before response header check (avoiding panic)
  • replace sync.Once approach so transient network errors are not cached

axw added 2 commits July 9, 2021 10:21
- don't issue original request if product check fails
- check original request error before response header check
  (avoiding panic)
The product check could have failed because
of a transient network error, so repeat the
check on subsequent requests as long as there
has not been a prior success.
@Anaethelion
Copy link
Contributor

LGTM!

@Anaethelion Anaethelion merged commit 747cce2 into elastic:7.x Jul 12, 2021
Anaethelion pushed a commit to Anaethelion/go-elasticsearch that referenced this pull request Jul 12, 2021
* Product check improvements

- don't issue original request if product check fails
- check original request error before response header check
  (avoiding panic)

* Don't cache product check errors

The product check could have failed because
of a transient network error, so repeat the
check on subsequent requests as long as there
has not been a prior success.
Anaethelion added a commit that referenced this pull request Jul 12, 2021
* Product check improvements

- don't issue original request if product check fails
- check original request error before response header check
  (avoiding panic)

* Don't cache product check errors

The product check could have failed because
of a transient network error, so repeat the
check on subsequent requests as long as there
has not been a prior success.

Co-authored-by: Andrew Wilkins <axw@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants