Skip to content

Commit f05c6be

Browse files
committed
Fix BWC issue of the translog last modified age stats
We added a rest test for the translog last modified age without a version check. This causes BWC failed because the stats are not available in the old versions. Relates #28613
1 parent 7d3e7ef commit f05c6be

File tree

1 file changed

+16
-2
lines changed
  • rest-api-spec/src/main/resources/rest-api-spec/test/indices.stats

1 file changed

+16
-2
lines changed

rest-api-spec/src/main/resources/rest-api-spec/test/indices.stats/20_translog.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ setup:
3636
# non empty generation with one op may be smaller or larger than that.
3737
# - gt: { indices.test.primaries.translog.uncommitted_size_in_bytes: $creation_size }
3838
- match: { indices.test.primaries.translog.uncommitted_operations: 1 }
39-
- gte: { indices.test.primaries.translog.earliest_last_modified_age: 0 }
4039

4140
- do:
4241
indices.flush:
@@ -50,7 +49,6 @@ setup:
5049
## creation translog size has some overhead due to an initial empty generation that will be trimmed later
5150
- lt: { indices.test.primaries.translog.uncommitted_size_in_bytes: $creation_size }
5251
- match: { indices.test.primaries.translog.uncommitted_operations: 0 }
53-
- gte: { indices.test.primaries.translog.earliest_last_modified_age: 0 }
5452

5553
- do:
5654
indices.put_settings:
@@ -72,4 +70,20 @@ setup:
7270
- match: { indices.test.primaries.translog.operations: 0 }
7371
- lte: { indices.test.primaries.translog.uncommitted_size_in_bytes: $creation_size }
7472
- match: { indices.test.primaries.translog.uncommitted_operations: 0 }
73+
74+
---
75+
"Translog last modified age stats":
76+
- skip:
77+
version: " - 6.2.99"
78+
reason: translog last modified age stats was added in 6.3.0
79+
- do:
80+
index:
81+
index: test
82+
type: bar
83+
id: 1
84+
body: { "foo": "bar" }
85+
86+
- do:
87+
indices.stats:
88+
metric: [ translog ]
7589
- gte: { indices.test.primaries.translog.earliest_last_modified_age: 0 }

0 commit comments

Comments
 (0)