Allocate_stale_primary appears to succeed on wrong node

(Harsh Bajaj) #1

I'm facing the same issue in v6.4.2 version and this is fixed in v6.5.1 as per below mentioned link.

I just want to know that is there any workaround to fix this problem in v6.4.2.

Harsh Bajaj

(David Turner) #2

Hi @harshbajaj16, the issue you mention is just to improve how an error is reported. I'm not really sure what a "workaround" is in this case. Perhaps it is to avoid the error by allocating a stale primary on the correct node by checking GET _shard_stores first.

(Harsh Bajaj) #3

HI @DavidTurner,
sorry for miscommunication. actually i'm facing below problem and want to resolve the same. could you please help?

Caused by: no segments* file found in store(ByteSizeCachingDirectory(MMapDirectory@/Users/davidturner/discuss/162719/elasticsearch-6.5.1/data-1/nodes/0/indices/YPnPuK8hRnyDHjzM2EhLtQ/1/index files: []

While allocating the shard on correct node its showing "acknowledged": true, but still shard is in unassigned state.

Please let me know the approach how can we allocate the shard where "no segments* file found in store" error occur.

Harsh Bajaj

(David Turner) #4

This error message indicates that the store you've chosen is empty - there's no stale shard copy to allocate there. Either pick a node that does have a copy of this shard (found using GET _shard_stores perhaps) or use allocate_empty_primary instead of allocate_stale_primary. Either way you risk losing data btw.

(Harsh Bajaj) #5

Yes @DavidTurner its working now. i was not sure allocate_empty_primary will solve this problem or not.


1 Like
(system) closed #6

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.