2014年6月10日 星期二

[elasticsearch]Users with Elasticsearch 1.2.0 should immediately upgrade to 1.2.1




Due to the routing problmes ,Elasticsearch official blog recommend that anyone using version 1.2.0 upgrade immediately to this 1.2.1 release.


“We removed the 1.2.0 release from our download site and repositories due to the severity of the bug. Users with Elasticsearch 1.2.0 should immediately upgrade to 1.2.1.”

1.2.0 版已經從官方的 download 下架了,從這篇文章,可以清楚了解 Elasticsearch的原理。當一個 document要建立索引時,會產生一個 document id,那個id 透過 hash 的方式會 routing 到特定的 shard 上。


"Before we can discuss the tool we developed to help fix damage from the bug, we have to understand the problem the bug created. When Elasticsearch stores a document it has to decide which shard to put the document in. It does this by computing a hash of the document’s “UID”, which is by default the type#id tuple of the document. Elasticsearch then uses that hash modulo the number of shards to pick a shard. We have to make sure that this hash function works the same across different versions of Elasticsearch. If it doesn’t, version X could expect to find a given document in shard 1 and version X+1 could expect the same document in shard 2. In this case, version X+1 could not directly get the document if it were indexed while running version X."

這裡的一個routing 問題就在於 1.2.0 的 hash  方式導致 consistent hash 跟以往不同了。還有可能會導致,你使用 ID 找不到索引的 docuemnt。

The bug in 1.2.0 broke this consistent, cross-version hashing. 1.2.1 restored the same hash operation as used in previous versions (except 1.2.0). Once you’ve upgraded to 1.2.1 there are a few potential problems:
  • documents indexed in 1.2.0 are now in the “wrong” shard. You may not be able to retrieve (get) documents by ID when they were indexed in the wrong shard.
  • documents that were updated in 1.2.0 may now exist in two places: the correct shard (as in 1.2.1) and the wrong shard (as in 1.2.0).



Elasticsearch.org Elasticsearch 1.2.1 Released | Blog | Elasticsearch
Elasticsearch.org A Tool To Help With Routing Issues From Elasticsearch 1.2.0 | Blog | Elasticsearch
http://www.elasticsearch.org/blog/tool-help-routing-issues-elasticsearch-1-2-0/


REF:
peicheng-note: elasticsearch 相關 elasticsearch文章
http://peichengnote.blogspot.tw/search/label/elasticsearch
peicheng-note: [elasticsearch] document id _id field uuid
http://peichengnote.blogspot.tw/2014/05/elasticsearch-document-id-id-field-uuid.html
peicheng-note: [elasticsearch/logstash] logstash id 自動產生 document id "_id" automatic id generation
http://peichengnote.blogspot.tw/2014/04/elasticsearchlogstash-logstash-id.html


沒有留言:

張貼留言