-
Notifications
You must be signed in to change notification settings - Fork 62
Description
Describe the bug
We have had problems with posts being deleted from Algolia indexes on update, both when the editors updates post via WP Admin and also by using $algolia->get_index('posts_poi')->sync($post) which we are using for batch updating of posts.
We disabled the async update to avoid race conditions by this filter: add_filter('algolia_should_wait_on_delete_item', '__return_true');
It seems to have improved, but we are still occasionally see this issues. When inspecting the Algolia API log for those instances, we can see that the time stamp for both delete and update are identically.
What can we expect from the algolia_should_wait_on_delete_item filter.
To Reproduce
Steps to reproduce the behavior:
- Enabled the the filter add_filter('algolia_should_wait_on_delete_item', '__return_true');
- Make updates to posts
- Inspect the Algolia API Log and occasionally you will see that update and delete requests have the same timestamp, sometimes this leads to race conditions and the post is deleted from Algolia.
Expected behavior
No race conditions and deletions of posts in Algolia with the algolia_should_wait_on_delete_item filter enabled.
Screenshots

