Skip to content

Commit

Permalink
Update four-hotels-serve.md
Browse files Browse the repository at this point in the history
  • Loading branch information
holic authored Dec 4, 2023
1 parent 6448fe6 commit 755484a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .changeset/four-hotels-serve.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

Previously, all `store-sync` strategies were susceptible to a potential memory leak where the stream that fetches logs from the RPC would get ahead of the stream that stores the logs in the provided storage adapter. We saw this most often when syncing to remote Postgres servers, where inserting records was much slower than we retrieving them from the RPC. In these cases, the stream would build up a backlog of items until the machine ran out of memory.

This is now fixed by waiting for logs to be stored before fetching the next batch of logs from the RPC. To make this strategy work, we had to remove `blockLogs$` (stream of logs fetched from RPC but before they're stored) from in favor of just `storedBlockLogs$` (stream of logs fetched from RPC after they're stored).
This is now fixed by waiting for logs to be stored before fetching the next batch of logs from the RPC. To make this strategy work, we no longer return `blockLogs$` (stream of logs fetched from RPC but before they're stored) and instead just return `storedBlockLogs$` (stream of logs fetched from RPC after they're stored).

0 comments on commit 755484a

Please sign in to comment.