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
The JSON RPC filters currently handle incoming data by storing all pending objects in memory, awaiting transmission to the client. This approach leads to significant duplication of elements in memory for each user, which increases the risk of encountering Out-of-Memory (OOM) errors.
To mitigate these issues, I propose the following changes to how data is managed:
Rather than storing all filtered objects in memory, maintain only a pointer for each client subscribed to the endpoint. This pointer will indicate the block height last processed for that client.
When a client makes a new request, fetch all relevant data entries from the database starting from the block height indicated by the stored pointer.
Apply filters to the data only on request.
After the data has been transmitted to the client, update the pointer to reflect the most recent block height that has been processed. We can use PebbleDB to store these pointers. This not only ensures durability across indexer restarts but also facilitates atomic updates of pointers.
The text was updated successfully, but these errors were encountered:
Description
The JSON RPC filters currently handle incoming data by storing all pending objects in memory, awaiting transmission to the client. This approach leads to significant duplication of elements in memory for each user, which increases the risk of encountering Out-of-Memory (OOM) errors.
To mitigate these issues, I propose the following changes to how data is managed:
The text was updated successfully, but these errors were encountered: