This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
protection against metadata inconsistency and/or data loss #2519
Labels
kind/question
Further information is requested
A small code review was performed on the
Unlink()
call in juicefs. There are constructs in the transaction handling that seem problematic.Here is a pseudo-trace rundown of a file deletion from the FUSE layer.
deleteChunk()
starts new tx, does changes to the database and commits itdeleteChunk()
callsdeleteSlice()
deleteSlice()
callsm.newMsg(DeleteSlice)
which runs the user's callback (which removes object data, as initialized byregisterMetaMsg()
inmount()
)deleteSlice()
starts new tx, updates the database and commits itdoDeleteFileData()
starts a new tx, changes the database and commits itProblem P1:
Problem P2:
Summary:
Proposed solutions:
Other information:
Unlink()
call was reviewed. The general issue of how transactional semantics are applied may potentially be a concern for other top-level calls as well.The text was updated successfully, but these errors were encountered: