Skip to content

Commit

Permalink
Update version when bulk param is available in ES stats API (elastic#…
Browse files Browse the repository at this point in the history
…18459)

* Update version when bulk param is available in ES stats API

* Updating unit tests
  • Loading branch information
ycombinator authored May 15, 2020
1 parent 1ece3b6 commit 1dde9f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion metricbeat/module/elasticsearch/elasticsearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ var CCRStatsAPIAvailableVersion = common.MustNewVersion("6.5.0")
var EnrichStatsAPIAvailableVersion = common.MustNewVersion("7.5.0")

// BulkStatsAvailableVersion is the version since when bulk indexing stats are available
var BulkStatsAvailableVersion = common.MustNewVersion("7.8.0")
var BulkStatsAvailableVersion = common.MustNewVersion("8.0.0")

// Global clusterIdCache. Assumption is that the same node id never can belong to a different cluster id.
var clusterIDCache = map[string]string{}
Expand Down
4 changes: 2 additions & 2 deletions metricbeat/module/elasticsearch/index/index_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func TestGetServiceURI(t *testing.T) {
expectedPath: statsPath,
},
"bulk_stats_available": {
esVersion: common.MustNewVersion("7.8.0"),
esVersion: common.MustNewVersion("8.0.0"),
expectedPath: strings.Replace(statsPath, statsMetrics, statsMetrics+",bulk", 1),
},
}
Expand All @@ -58,7 +58,7 @@ func TestGetServiceURIMultipleCalls(t *testing.T) {
var uri string
var err error
for i := uint(0); i < numCalls; i++ {
uri, err = getServicePath(*common.MustNewVersion("7.8.0"))
uri, err = getServicePath(*common.MustNewVersion("8.0.0"))
if err != nil {
return false
}
Expand Down

0 comments on commit 1dde9f4

Please sign in to comment.