"upload a new version" replaces old version
Closed, ResolvedPublic

Description

Author: saibotrash

Description:
Please see here:
http://commons.wikimedia.org/wiki/Commons:Village_pump#.22upload_a_new_version.22_replaces_old_version perm: http://commons.wikimedia.org/w/index.php?title=Commons:Village_pump&oldid=67949381#.22upload_a_new_version.22_replaces_old_version

Looks like a bad bug if the file really got overwritten without a new file version entry


Version: 1.19
Severity: major

bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz34993.
bzimport created this task.Via LegacyMar 6 2012, 12:23 AM
Bawolff added a comment.Via ConduitMar 6 2012, 12:30 AM

CC'ing aaron, as there is a good chance this is file-backend-rewrite related.

To repeat the actual error messages reported on commons when uploading the affected image:

First time around: "Could not store file /tmp/phpYIAfCo at mwstore://local-backend/local-public/4/42/Bundesarchiv_Bild_146-1978-043-13,_Erwin_v._Witzleben.jpg."

Second time around:

Empty oi_archive_name. Database and storage out of sync?

Backtrace:

#0 /usr/local/apache/common-local/php-1.19/includes/filerepo/file/LocalFile.php(911): LocalFile->recordUpload2('', 'losslessly crop...', false, Array, false, Object(User))
#1 /usr/local/apache/common-local/php-1.19/includes/upload/UploadBase.php(573): LocalFile->upload('/tmp/phpItyZHg', 'losslessly crop...', false, 1, Array, false, Object(User))
#2 /usr/local/apache/common-local/php-1.19/includes/specials/SpecialUpload.php(446): UploadBase->performUpload('losslessly crop...', false, true, Object(User))
#3 /usr/local/apache/common-local/php-1.19/includes/specials/SpecialUpload.php(181): SpecialUpload->processUpload()
#4 /usr/local/apache/common-local/php-1.19/includes/SpecialPageFactory.php(476): SpecialUpload->execute(NULL)
#5 /usr/local/apache/common-local/php-1.19/includes/Wiki.php(263): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#6 /usr/local/apache/common-local/php-1.19/includes/Wiki.php(593): MediaWiki->performRequest()
#7 /usr/local/apache/common-local/php-1.19/includes/Wiki.php(503): MediaWiki->main()
#8 /usr/local/apache/common-local/php-1.19/index.php(58): MediaWiki->run()
#9 /usr/local/apache/common-local/live-1.5/index.php(3): require('/usr/local/apac...')
#10 {main}

aaron added a comment.Via ConduitMar 6 2012, 12:36 AM

The exception is new. Previously, garbage values would go in the DB. See bug 34934.

MarkAHershberger added a comment.Via ConduitMar 7 2012, 2:52 AM

Aaron, could you look at replacing the exception with a more friendly error message?

aaron added a comment.Via ConduitMar 7 2012, 11:10 PM

This should stop occurring with r113312.

The missing files should still be floating around on NFS. The metadata in the DB row right now for the effected files must be incorrect. This would need to be located and manually fixed. This may warrant a separate shell bug.

bzimport added a comment.Via ConduitMar 8 2012, 12:34 AM

saibotrash wrote:

(In reply to comment #4)

This should stop occurring with r113312.

The missing files should still be floating around on NFS. The metadata in the
DB row right now for the effected files must be incorrect. This would need to
be located and manually fixed. This may warrant a separate shell bug.

did so: bug 35048

bzimport added a comment.Via ConduitMar 8 2012, 12:35 AM

saibotrash wrote:

(In reply to comment #4)

This should stop occurring with r113312.

Do you know how many files were affected? Or when (which conditions) this happened?

bzimport added a comment.Via ConduitMar 9 2012, 2:21 PM

common.good wrote:

I do not know if this is important:

Same error message but different behavior today:

File:Bundesarchiv Bild 183-09587-0004, West-Staaken, Ausgabe von Lebensmittelkarten.jpg

First attempt failed (error message: "Could not store file /tmp/...").
Second upload worked.

Result:
Original version still available.
First reupload is missing (linking to [http://upload.wikimedia.org/wikipedia/commons/archive/1/1a/] (sic))
Second reupload available.

Same here:
File:Bundesarchiv Bild 183-1982-0510-014, Meiningen, Maschinenhof des KfL.jpg

aaron added a comment.Via ConduitMar 9 2012, 4:13 PM

(In reply to comment #7)

I do not know if this is important:

Same error message but different behavior today:

That is the behavior I'd expect when storing the temp file fails (this is how it used to be in 1.18). It's still ugly and should look more atomic, but that will probably cleaned up later.

Gilles added a project: Multimedia.Via WebDec 4 2014, 9:33 AM
Gilles moved this task to Closed on the Multimedia workboard.

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.