objectfs: wire streams change-log for metadata mutations #68
Can we use a proto format here?
Let's add a TODO here, we normally will also want to write a blob and then wait for both.
Let's add a TODO here: should volume IDs be UUIDs (probably yes)
Let's add a todo: we always want to assume a WAL, and maybe it would be nice to have a wal-client mode that was local-only e.g. for testing.
Let's add a TODO: orient everything around the structure of these operations, there is no need to translate back-and-forth. We probably could replace our whole protocol with a "DoOperation" method, which then keys on Type to validate etc.
Although on the other hand we probably want to store items in the log more efficiently, e.g. we probably don't want the path, we want the parent dnode (?) and the name of the entry we are deleting here.
I think FUSE works like this though, so not sure if this is a sign of us doing too many translations.
Let's not bother here, we aren't in production so if something is legacy just delete the code
Approved these changes.
justinsb
codebot-robot
This PR integrates the Streams WAL client into ObjectFS Volume and Server to transition ObjectFS metadata to a change-log database model.
Key changes:
MutationRecordand discrete mutation types (MKDIR,CREATE_FILE,WRITE_FILE,TRUNCATE_FILE,UNLINK,RMDIR,RENAME).Volumewith configurable durability levels (Local,Witness,Permanent) andWriteModesynchronization.ApplyRecordLockedand deterministic crash recovery replay from local WAL segment records on volume startup.--wal-dir,--wal-target, and--wal-durabilityflags toobjectfs-controller.Fixes #66