mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 10:07:28 +01:00
UpdateEntry reads the entry, checks its preconditions against it, then writes. The path lock keeps the two together only against writers of that path on that filer. A rename or a delete sent to another filer does not take it, and on any filer a rename or recursive delete of a directory above the entry moves and removes what is below it unlocked. One that committed between the read and the write had the write store the entry again at the path it had left, and the update returned success: the entry back under a directory that is gone, two names sharing chunks, or a file back after its unlink returned. Where the store refuses a conflicting commit, the read, the checks and the write now run in one store transaction. The rename or delete wrote the entry's key after it began, so the commit is refused with ErrTransactionConflict and the update runs again, up to five times with the rename's back-off, and answers from what is there now. - filer.ConflictRefusingStore is how a store says so. TiKV does. Other stores, and entries in a path-specific store, run once without a transaction, as before. - A refused run gives up its commit stamp and deletes the manifest chunks it folded the request's chunks into. - Chunk deletion and the metadata event come after the commit, in the order they had. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>