Enforce write-once property #1
Loading…
Reference in a new issue
No description provided.
Delete branch "mra/write-once"
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?
This PR implements write-once enforcement. It does this by reading 1 byte at the supplied offset and testing that it gets
eof
from the Erlang run-time. Other values are treated as errors: if bytes are returned from the read attempt, we respond with an{error, error_written}
tuple. Other errors would come from the POSIX file handling layer and are passed through unchanged.TODO:
[] Build a manager process which serializes reads/writes/appends to a given prefix and tracks the state of written/not written on a byte level basis.
Closing in favor of #6
Pull request closed