Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions qa/rolling-upgrade/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ for (Version version : bwcVersions.wireCompatible) {
dataDir = { nodeNumber -> oldClusterTest.nodes[stopNode].dataDir }
setting 'repositories.url.allowed_urls', 'http://snapshot.test*'
setting 'node.name', "upgraded-node-${stopNode}"
setting 'node.attr.gen', "upgraded"
setting 'logger.level', 'DEBUG'
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
"Index to old node":
- skip:
features: ["node_selector","warnings"]
- do:
node_selector:
attribute:
gen: "old"
bulk:
refresh: true
body:
- '{"index": {"_index": "jodaindex", "_type": "doc", "_id": "id_2"}}'
- '{"datefield": "2019-01-02T00:00+01:00"}'

- do:
indices.flush:
index: jodaindex

- do:
node_selector:
attribute:
gen: "old"
warnings:
- 'There are doc-value fields which are not using a format. The output will change in 7.0 when doc value fields get formatted based on mappings by default. It is recommended to pass [format=use_field_mapping] with a doc value field in order to opt in for the future behaviour and ease the migration to 7.0: [count]'
search:
index: jodaindex
body:
sort: datefield
docvalue_fields: [ "count"]
- match: { hits.total: 2 }
- match: { hits.hits.0._id: id_1 }
- match: { hits.hits.1._id: id_2 }
- match: { _shards.failed: 0 }



---
"Search index with joda format that generates a warning":
- skip:
features: "node_selector"
- do:
node_selector:
attribute:
gen: "upgraded"
search:
index: jodaindex
body:
sort: datefield
docvalue_fields: [ "count"]
- match: { hits.total: 2 }
- match: { hits.hits.0._id: id_1 }
- match: { hits.hits.1._id: id_2 }
- match: { _shards.failed: 0 }

Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
"Create index with joda format that generates a warning":
- skip:
features: "warnings"
version: "6.7.1 - "
reason: date from warning wars removed in 6.7
- do:
indices.create:
index: jodaindex
body:
mappings:
"doc":
"properties":
"datefield":
"type": "date"
"format": "YYYY-MM-dd'T'HH:mmZZ"

- do:
bulk:
refresh: true
body:
- '{"index": {"_index": "jodaindex", "_type": "doc", "_id": "id_1"}}'
- '{"datefield": "2019-01-02T00:00+01:00"}'

- do:
search:
index: jodaindex
body:
query:
range:
datefield:
gte: "2019-01-01T00:00+01:00"
- match: { hits.total: 1 }
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
"Search index with joda format that generates a warning":
- skip:
features: "warnings"
- do:
search:
rest_total_hits_as_int: true
index: jodaindex*
body:
query:
range:
datefield:
gte: "2019-01-01T00:00+01:00"
- match: { hits.total: 5 }
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@ private void putSingleHeader(String key, String value, Map<String, String> newHe
}
}


private ThreadContextStruct putHeaders(Map<String, String> headers) {
if (headers.isEmpty()) {
return this;
Expand Down