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
Erigon has a reference counter attached to snapshot files in use by AggregatorRoTx. When AggregatorRoTx is closed (using Close()) it triggers a scheduled cleanup of files that have been merged into bigger files (closeFilesAndRemove). If AggregatorRoTx is not opened, refcount is zero and closeFilesAndRemove happens immediately after merging (deleteMergeFile).
Currently this is not coordinated with silkworm. While using snapshot files managed by erigon, silkworm is not beginning an AggregatorRoTx. If the files are merged, they will be unmapped, closed and deleted (mmap.Munmap). At this point SnapshotRepository will contain dangling references that will lead to errors or crashes.
We need to care about the following:
If snapshot files are currently in use by a datastore query, the usage refcount must be incremented on the Erigon side to prevent cleanup. When snapshot files are no longer in use - decrement refcount.
If files are cleaned up by Erigon, they must be removed from SnapshotRepository.
The text was updated successfully, but these errors were encountered:
Erigon has a reference counter attached to snapshot files in use by AggregatorRoTx. When AggregatorRoTx is closed (using Close()) it triggers a scheduled cleanup of files that have been merged into bigger files (closeFilesAndRemove). If AggregatorRoTx is not opened, refcount is zero and closeFilesAndRemove happens immediately after merging (deleteMergeFile).
Currently this is not coordinated with silkworm. While using snapshot files managed by erigon, silkworm is not beginning an AggregatorRoTx. If the files are merged, they will be unmapped, closed and deleted (mmap.Munmap). At this point SnapshotRepository will contain dangling references that will lead to errors or crashes.
We need to care about the following:
The text was updated successfully, but these errors were encountered: