f7358424e4
* maybe_gc/2 is triggered at machi_file_proxy, when chunk is deleted and the file is larger than `max_file_size` * A file is deleted if all chunks except 1024 bytes header are trimmed * If a file is going to be deleted, file_proxy notifies metadata_mgr to remember the filename persistently, whose filename is `known_files_<FluName>` * Such trimmed filenames are stored in a machi_plist file per flu * machi_file_proxy could not be started if the filename is in the manager's list. Consequently, any write, read and trim operations cannot happen against deleted file. * After the file was trimmed, any read request to the file returns `{error, trimmed}` * Disclaimer: no tests written yet and machi_plist does not support any recovery from partial writes. * Add some thoughts as comments for repairing trims. * State diagram of every byte is as follows: ``` state\action| write/append | read_chunk | trim_chunk ------------+----------------+------------------+--------------- unwritten | -> written | fail (+repair) | -> trimmed written | noop or repair | return content | -> trimmed trimmed | fail | fail | noop ``` |
||
---|---|---|
.. | ||
legacy | ||
pulse_util | ||
machi_admin_util_test.erl | ||
machi_chain_manager1_converge_demo.erl | ||
machi_chain_manager1_pulse.erl | ||
machi_chain_manager1_test.erl | ||
machi_cinfo_test.erl | ||
machi_cr_client_test.erl | ||
machi_csum_table_test.erl | ||
machi_file_proxy_eqc.erl | ||
machi_file_proxy_test.erl | ||
machi_flu1_test.erl | ||
machi_flu_psup_test.erl | ||
machi_partition_simulator.erl | ||
machi_pb_high_client_test.erl | ||
machi_pb_test.erl | ||
machi_plist_test.erl | ||
machi_projection_store_test.erl | ||
machi_projection_test.erl | ||
machi_proxy_flu1_client_test.erl |