github TanStack/db @tanstack/electric-db-collection@0.2.19

8 hours ago

Patch Changes

  • Fix slow onInsert awaitMatch performance issue (#1062)

    The message buffer was being cleared at the start of each new batch, causing messages to be lost when multiple batches (including heartbeats) arrived before awaitMatch was called. This resulted in awaitMatch timing out (~3-5s per attempt) and transaction rollbacks.

    The fix removes the buffer clearing between batches. Messages are now preserved until the buffer reaches MAX_BATCH_MESSAGES (1000), at which point the oldest messages are dropped. This ensures awaitMatch can find messages even when sync activity arrives before the API call completes.

Don't miss a new db release

NewReleases is sending notifications on new releases.