You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In v4, the hosts are solely determined on the HTTP method (in this case POST), which leads to the use of the "write" hosts.
This can have drastic implications, as we've found out.
For example, when browsing objects just after an update, the update may not have been propagated.
In our case/app, it lead to the accidental deletion of records in the following scenario:
Records are synchronized to the search index. For each record syncedOn: {sync_time} is set. Task completion is awaited.
Stale records (in the search index) are identified through /browse (syncedOn < {sync_time}). All updated records are also included in the result ⚠️
Description
In
v3
of the library, the "read" hosts were used (see https://github.com/algolia/algoliasearch-client-php/blob/v3/src/Iterators/ObjectIterator.php#L36).In
v4
, the hosts are solely determined on the HTTP method (in this casePOST
), which leads to the use of the "write" hosts.This can have drastic implications, as we've found out.
For example, when browsing objects just after an update, the update may not have been propagated.
In our case/app, it lead to the accidental deletion of records in the following scenario:
syncedOn: {sync_time}
is set. Task completion is awaited./browse
(syncedOn < {sync_time}
). All updated records are also included in the resultClient
Search
Version
4.4.3
Relevant log output
The text was updated successfully, but these errors were encountered: