Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support/historyarchive: Fix error reporting (#1648)
After deploying `release-horizon-v0.20.1` branch to staging server it stopped processing ledger entries after around 300k entries with an error: ``` Read wrong number of bytes from XDR ``` returned from `XdrStream.ReadOne`. First, I changed the code to return `err` values before proceeding to the next checks. This reveal the real error: ``` stream error: stream ID 311; PROTOCOL_ERROR ``` I couldn't find any information online about this but I suspect this is happening because of the idle timeout. In `SingleLedgerStateReader` we preload entries for a better performance (smaller round-trip time) when getting temporary data from `TempSet`. When entries are being processed the connection stays idle. The second fix (actually: quickfix) was decreasing `preloadedEntries` to `20000` what makes a delay between streaming batches shorter. However it's not a permanent fix. The issue is tracked in #1649.
- Loading branch information