question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

gms report ES all shards failed when ES index mapping upgrade

See original GitHub issue

Due to biz needs, the dataset-index mapping definition has been adjusted. But after I adjust the definition, the gms service will report an exception.

Reproduce step:

curl -X POST \
  http://10.190.81.17:9200/datasetdocument/_search \
  -H 'Content-Type: application/json' \
  -d '{
	"query": {
		"query_string": {
			"query": "description:维度"
		}
	}
}'

curl -sS -XPUT http://10.190.81.17:9200/datasetdocumentv2 -H 'Content-Type: Application/JSON' --data @dataset-index-config.json | jq .

curl -X POST \
  http://10.190.81.17:9200/_reindex \
  -H 'Content-Type: application/json' \
  -d '{
  "source": {
    "index": "datasetdocumentv2"
  },
  "dest": {
    "index": "datasetdocument"
  }
}'

curl -X POST \
  http://10.190.81.17:9200/_aliases \
  -H 'Content-Type: application/json' \
  -d '{
  "actions": [
    {
      "add": {
        "index": "datasetdocumentv2",
        "alias": "datasetdocument"
      }
    },
    {
      "remove_index": {
        "index": "datasetdocument"
      }
    }
  ]
}'

Exception:

04:26:53.021 [qtp626202354-16] ERROR c.l.metadata.dao.browse.ESBrowseDAO - Browse query failed: Elasticsearch exception [type=search_phase_execution_exception, reason=all shards failed]
04:26:56.098 [qtp626202354-20] ERROR c.l.metadata.dao.search.ESSearchDAO - Auto complete query failed:Elasticsearch exception [type=search_phase_execution_exception, reason=all shards failed]
04:26:56.233 [qtp626202354-13] ERROR c.l.metadata.dao.search.ESSearchDAO - Search query failed:Elasticsearch exception [type=search_phase_execution_exception, reason=all shards failed]
...

2020-08-10 13-13-22屏幕截图

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
cobolbabycommented, Aug 11, 2020

@camelliazhang the dataset BACK_FILL is awesome.

1reaction
camelliazhangcommented, Aug 11, 2020

@cobolbaby Reindex API does not work well for your case. If you have made changes on index mapping, you will need to bootstrap your new index (let’s call it new_index). How many datasets do you have in total? You may need to either replay all the MCEs or call dataset BACK_FILL to fill your new index. After the new_index is completely populated, you can then do alias switch with current live index.

Internally we are actively working on the improvement for the backfill process, will provide documentation about it too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

gms report ES all shards failed when ES index mapping ...
Due to biz needs, the dataset-index mapping definition has been adjusted. But after I adjust the definition, the gms service will report an ......
Read more >
All Shards Failed - Common causes and quick fixes - Opster
A detailed guide on how to resolve errors related to "All Shards Failed" ... However, if you have defined index mapping,and if you...
Read more >
Fix common cluster issues | Elasticsearch Guide [8.5] | Elastic
There are multiple reasons why shards might get unassigned, ranging from misconfigured allocation settings to lack of disk space. Troubleshooting an unstable ...
Read more >
All shards failed - elasticsearch - Stack Overflow
first thing first, all shards failed exception is not as dramatic as it sounds, it means shards were failed while serving a request(query...
Read more >
Elasticsearch ALL SHARDS FAILED - Google Groups
It seems that there is a permission issue in that path so Elasticsearch cannot allocate the shards, its expected that the user that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found