-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
:Data Management/Indices APIsAPIs to create and manage indices and templatesAPIs to create and manage indices and templates>buggood first issuelow hanging fruitlow hanging fruithelp wantedadoptmeadoptme
Description
Elasticsearch version: 5.3.0
The rollover max_docs value uses the doc count from both primary and replica/s. It should be based upon the primary only, since the replica count can be changed.
(start two nodes, to allow the default 1 replica to allocate)
PUT /logs-000001
{
"aliases": {
"logs_write": {}
}
}
PUT logs_write/test/1
{
"blah": "foo"
}
POST /logs_write/_rollover?dry_run
{
"conditions": {
"max_docs": 2
}
}
# response
{
"old_index": "logs-000001",
"new_index": "logs-000002",
"rolled_over": false,
"dry_run": true,
"acknowledged": false,
"shards_acknowledged": false,
"conditions": {
"[max_docs: 2]": true
}
}
change the replica count to 0:
PUT /logs-000001/_settings
{
"index": {
"number_of_replicas": 0
}
}
# response
{
"old_index": "logs-000001",
"new_index": "logs-000002",
"rolled_over": false,
"dry_run": true,
"acknowledged": false,
"shards_acknowledged": false,
"conditions": {
"[max_docs: 2]": false
}
}
Metadata
Metadata
Assignees
Labels
:Data Management/Indices APIsAPIs to create and manage indices and templatesAPIs to create and manage indices and templates>buggood first issuelow hanging fruitlow hanging fruithelp wantedadoptmeadoptme