Refresh_interval safety

Hi,

I know that until the refresh_interval of a specific index passes, the docs are not searchable.

But what happens if during that time until the interval, the node dies? Does the replica also holds the same in-memory docs that are stored until the refresh_interval is reached, and will it be able to continue from the same position? Or are those documents lost?

The way that elasticsearch prevents documents lost before refresh is translog. You can learn more from here.

The primary and replica handle documents by themselves. It means that the in-memory docs might be different at the same time but finally it'll be the same.

So if I set refresh_interval to 10m, and the primary node for the index goes down after 5m, the docs that were indexed during those 5m will still exist

Of course. Because you have replica node to hold all the documents. Every document will recover from replica node when primary node restarts.

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