FOSElasticaBundle icon indicating copy to clipboard operation
FOSElasticaBundle copied to clipboard

--pager-persisters=async with aliases

Open kezek opened this issue 2 years ago • 3 comments

Hey guys.

Nice job with the Symfony Messenger integration , works well , but I'm having an issue with aliases.

When I'm running the populate job I've got downtime (empty nodes which I didn't had previously , without async) and I'm not really sure what's the approach in avoiding that downtime.

Resetting X Refreshing X

Resetting Y Refreshing Y

I know I can use --no-reset to avoid refreshing , but how would I force a refresh considering that the populate is now async ?

Thanks and hopefully I was clear.

kezek avatar Dec 12 '22 12:12 kezek

I'm not sure that you can achieve that due to the whole async approach. It first resets the index, then queues all populates via messenger, and then messenger starts consuming. I'm afraid there is no way to do reset of the index before messenger starts consuming messages and re-populates your index. One thing that I'm using is passing an --index=<index_name> --pager-persister=async and thus reseting single index, tho I assume you don't want to run manually command for each index, but rather to re-populate all indexes at once.

boskos-q avatar Feb 09 '23 14:02 boskos-q

Same issue...

vladdnepr avatar Apr 14 '23 12:04 vladdnepr

Hi. I found a solution

https://gist.github.com/vladdnepr/728e1b7b428923443f25d06984034f7a

Hope this helps

vladdnepr avatar Apr 15 '23 11:04 vladdnepr