algolia / firestore-algolia-search

Apache License 2.0
112 stars 35 forks source link

feat: handle removed attributes #67

Closed smomin closed 3 years ago

smomin commented 3 years ago
saifurrehmanx commented 3 years ago

When this update will available in firebase extensions?

Haroenv commented 3 years ago

this makes sense to me, but why aren't we always using save object?

smomin commented 3 years ago

@Haroenv I am solving for race condition which is described here, https://github.com/algolia/firestore-algolia-search/issues/32. Now, using NodeJS, the race condition can be somewhat frequent to rare. The reason I did not use saveObject is because it does not provide versioning to protect against race conditions. The partialUpdate method has version which is helping to prevent the race condition. Or, I can implement an extra Firebase record update before sending it to Algolia but this will incurr a read hit.