Trim command and GC prototype implementation #32
Loading…
Reference in a new issue
No description provided.
Delete branch "ku/trim-and-gc"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
and the file is larger than
max_file_size
to remember the filename persistently, whose filename is
known_files_<FluName>
manager's list. Consequently, any write, read and trim operations
cannot happen against deleted file.
{error, trimmed}
any recovery from partial writes.
This pull request is supposed to cover all thoughts or fix to the issues mentioned in #14.
I should revisit race condition matrix of a byte including repair requests with more solid tests, which is a huge todo.
So I added
TRIMMED
flag to PB protocol so thatread_chunk
can return{error, trimmed}
which means all chunks of the file was trimmed. The background here are some combination of my thoughts:{ok, {[], [{0, infinity}]}}
is the very same response but an atominfinity
is a more wary value, which is often rather complicated to describe in other languages, like PB IDL. Just defining integer is much simpler.case read_chunk(...) of {error, trimmed} -> { forget about that file }; {ok, {Chunks, _}} -> { do what I wanted }
. This would be easier than to find outinfinity
from the response.Looks like we have some disagreement about the API & trimmed cases. We don't have a customer yet, so ... let's punt until we are closer to a real use case.
Thanks! +1
Next step:
{error, trimmed}
trim
commandmachi_pb_high_client.erl
.