feat: add block archiving support #339
Labels
Block Node
Issues/PR related to the Block Node.
Improvement
Code changes driven by non business requirements
P1
High priority issue. Required to be completed in the assigned milestone.
Milestone
Story
AS A Block Node User
I WANT to have my block files archived
SO THAT I will have a reduced storage cost
Tech Notes:
DEPENDS ON feat: add compression mode for BlockAsFileWriter #282
See Design a directory structure #125 where we have defined the design of the new
block-as-file
.The scope of this issue is to add archiving support to the block files that will be written to disk.
We need to implement a process/thread, that will be going to the fs and will be archiving block files that are already written to disk.
The parameters of this process/thread should probably be configurable externally.
The Archiving Process:
of items to be archived at a given time
e.g.
we are archiving per 1000, the live root will be writing 2000-2999,
1000-1999 is already written, and we are archiving at 0-999,
so in that way we have the less than 1000 most recent and also the
1000 before the most recent
but must not be less. Reasons for doing this:
The Algorithm:
Writing the blocks:
which will be an order of magnitude of 10
of magnitude as configured
between the live root and the archive root in order to ensure that
no partially written block will be archived, but also to have the
latest blocks present immediately which will be always more performant
for fetching them
be searched for under the symlink
what is in the live root
Searching for a block:
since there will be a symlink there that points to the actual place in the
archive root, but now we need to search for the symlink instead of where
the block would actually be
The text was updated successfully, but these errors were encountered: