This bounty is no longer available
Web3 DAO | Ethereum Foundation Logo

core/rawdb/freezer: table size is inaccurate if elements were removed from the tail


Ethereum Foundation






Freezer table can support both tail and head deletion. Tail deletion is a bit special, it will hide the removed items and keep them in the file. The file will only be dropped if all elements in this file are hidden. (we call it as lazy-deletion).

However, the reported size doesn't respect the tail deletion. The hidden items are still counted for overall table size. Although these elements are indeed live in the file system, but we might need another API to report the size of live elements to avoid some confusions.