Allocate_stale_primary appears to succeed on wrong node

Hi,
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.

Regards,
Harsh Bajaj

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.

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

Caused by: java.io.FileNotFoundException: no segments* file found in store(ByteSizeCachingDirectory(MMapDirectory@/Users/davidturner/discuss/162719/elasticsearch-6.5.1/data-1/nodes/0/indices/YPnPuK8hRnyDHjzM2EhLtQ/1/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@46a205e7)): 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.

Regards,
Harsh Bajaj

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.

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

Thanks.

1 Like

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