https://bugzilla.wikimedia.org/show_bug.cgi?id=15430





--- Comment #17 from Bryan Tong Minh <[email protected]>  2009-01-04 
22:01:09 UTC ---
(In reply to comment #16)

> Order of operations for the patch is:
> 
> 1) Physically move in the file
> 2) Add/update description page
> 3) Save 'image'/'oldimage' record
> 4) Save log entry
> 
> If we fail at 2) now, we have a file sitting around with no record. If this is
> an update to an existing file, we have a broken history and an untraceable,
> unexplained, unlogged change -- very bad.
> 
In case this is an existing file, we never reach Article::doEdit, so it can
never fail at that.

> Either we need to accept that failing the page is ok, or we need to be able to
> roll back the change to the actual file -- or else do it after, and be able to
> roll back all our DB and page updates if the file move fails. Icky. :(
> 
What I think is that we should accept that LocalFile::recordUpload2 does not
always succeed. In case it doesn't it should be guaranteed that it did not make
any changes and leave it to the caller to clean up the file.

The current situation is that in case it fails, it may or may not leave a log
entry depending on what caused the failure. This seems to me less desirable
than a clear guarantee that no log entry has been left.


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to