algolia / instantsearch-ios

⚡️ A library of widgets and helpers to build instant-search applications on iOS.
https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/ios/
Apache License 2.0
595 stars 58 forks source link

Insights: expired events in a batch make the server decline the whole batch #192

Closed VladislavFitz closed 2 years ago

VladislavFitz commented 3 years ago

Describe the bug 🐛

The server doesn't accept the Insights events older than 4 days. If a batch contains "expired" events and fresh events, they will all be declined by the server.

To Reproduce 🔍

Steps to reproduce the behavior:

  1. Track a few Insights events assigning them more than 4 days old timestamps
  2. Track a few Insights events with real-time timestamps
  3. Flush the events
  4. The server will decline the events batch

Expected behavior 💭

Before sending the events batch to the server, the expired events must be excluded.