grafana / pyroscope

Continuous Profiling Platform. Debug performance issues down to a single line of code
https://grafana.com/oss/pyroscope/
GNU Affero General Public License v3.0
10.14k stars 614 forks source link

feat(v2): block cleaner #3637

Closed aleks-p closed 1 month ago

aleks-p commented 1 month ago

Adds a block cleaner package for tracking deleted blocks. The purpose is:

Some other details:

TODO:

kolesnikovae commented 1 month ago

Looks good overall, however, I think we need to make sure that only the current leader removes blocks from the object storage. I might be mistaken, but this is not the case in the current version

aleks-p commented 1 month ago

Looks good overall, however, I think we need to make sure that only the current leader removes blocks from the object storage. I might be mistaken, but this is not the case in the current version

I've reworked things a bit, the blockcleaner package now acts mainly as a store for the markers. The Raft command and handling is moved to the metastore package. Instead of a leader check we now check that the instance that submitted the command against the instance running the command (using a generated id for now, but could be switched to use raft server ids).

I've also reduced the number of transactions dramatically, deletion is done in a single update transaction. Still lacking extensive test coverage but looks more robust in a dev deployment.