Skip to content

snapshot succeeds with missing index defined #25359

@jpcarey

Description

@jpcarey

Elasticsearch version: 5.4.1

Plugins installed: x-pack

JVM version:
java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)

OS version:
16.6.0 Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017; root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64

Description of the problem including expected versus actual behavior:
Creating a snapshot where one of the indices does not exist should result in a failed snapshot unless you have ignore_unavailable set to true. Rather, the snapshot succeeds and there is no indication of the missing index.

PUT /_snapshot/my_backup
{
  "type": "fs",
  "settings": {
    "compress": true,
    "location": "/Users/jared/tmp/blah"
  }
}

POST exists/test/1
{"hello": true}

PUT /_snapshot/my_backup/snapshot_1
{"indices":"exists,missing"}

GET /_snapshot/my_backup/snapshot_1/_status

# return
{
  "snapshots": [
    {
      "snapshot": "snapshot_1",
      "repository": "my_backup",
      "uuid": "Zp8WS3YdST-c65Ku_r9sVA",
      "state": "SUCCESS",
      "shards_stats": {
        "initializing": 0,
        "started": 0,
        "finalizing": 0,
        "done": 5,
        "failed": 0,
        "total": 5
      },
      "stats": {
        "number_of_files": 8,
        "processed_files": 8,
        "total_size_in_bytes": 3203,
        "processed_size_in_bytes": 3203,
        "start_time_in_millis": 1498150300101,
        "time_in_millis": 36
      },
      "indices": {
        "exists": {
          "shards_stats": {
            "initializing": 0,
            "started": 0,
            "finalizing": 0,
            "done": 5,
            "failed": 0,
            "total": 5
          },
          "stats": {
            "number_of_files": 8,
            "processed_files": 8,
            "total_size_in_bytes": 3203,
            "processed_size_in_bytes": 3203,
            "start_time_in_millis": 1498150300101,
            "time_in_millis": 36
          },
          "shards": {
            ... 
          }
        }
      }
    }
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions