r107197 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107196‎ | r107197 | r107198 >
Date:00:43, 24 December 2011
Author:aaron
Status:resolved (Comments)
Tags:
Comment:
* Follow-up r107195: these params are resource paths now, rather than hashes of the resource paths.
* Removed lockmanager-fail-acquirelocks message; a series of lockmanager-fail-acquirelock messages are now used instead.
Modified paths:
  • /trunk/phase3/includes/filerepo/backend/lockmanager/DBLockManager.php (modified) (history)
  • /trunk/phase3/includes/filerepo/backend/lockmanager/LSLockManager.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesQqq.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/backend/lockmanager/DBLockManager.php
@@ -111,7 +111,9 @@
112112 if ( $res === 'cantacquire' ) {
113113 // Resources already locked by another process.
114114 // Abort and unlock everything we just locked.
115 - $status->fatal( 'lockmanager-fail-acquirelocks', implode( ', ', $paths ) );
 115+ foreach ( $paths as $path ) {
 116+ $status->fatal( 'lockmanager-fail-acquirelock', $path );
 117+ }
116118 $status->merge( $this->doUnlock( $lockedPaths, $type ) );
117119 return $status;
118120 } elseif ( $res !== true ) {
Index: trunk/phase3/includes/filerepo/backend/lockmanager/LSLockManager.php
@@ -88,13 +88,17 @@
8989 if ( $res === 'cantacquire' ) {
9090 // Resources already locked by another process.
9191 // Abort and unlock everything we just locked.
92 - $status->fatal( 'lockmanager-fail-acquirelocks', implode( ', ', $paths ) );
 92+ foreach ( $paths as $path ) {
 93+ $status->fatal( 'lockmanager-fail-acquirelock', $path );
 94+ }
9395 $status->merge( $this->doUnlock( $lockedPaths, $type ) );
9496 return $status;
9597 } elseif ( $res !== true ) {
9698 // Couldn't contact any servers for this bucket.
9799 // Abort and unlock everything we just locked.
98 - $status->fatal( 'lockmanager-fail-acquirelocks', implode( ', ', $paths ) );
 100+ foreach ( $paths as $path ) {
 101+ $status->fatal( 'lockmanager-fail-acquirelock', $path );
 102+ }
99103 $status->merge( $this->doUnlock( $lockedPaths, $type ) );
100104 return $status;
101105 }
Index: trunk/phase3/languages/messages/MessagesQqq.php
@@ -1903,19 +1903,17 @@
19041904
19051905 # Lock manager
19061906 'lockmanager-notlocked' => 'Parameters:
1907 -* $1 is a key name.',
 1907+* $1 is a resource path (e.g. "mwstore://media-public/a/ab/file.jpg").',
19081908 'lockmanager-fail-closelock' => 'Parameters:
1909 -* $1 is a key name.',
 1909+* $1 is a resource path (e.g. "mwstore://media-public/a/ab/file.jpg").',
19101910 'lockmanager-fail-deletelock' => 'Parameters:
1911 -* $1 is a key name.',
 1911+* $1 is a resource path (e.g. "mwstore://media-public/a/ab/file.jpg").',
19121912 'lockmanager-fail-acquirelock' => 'Parameters:
1913 -* $1 is a key name.',
 1913+* $1 is a resource path (e.g. "mwstore://media-public/a/ab/file.jpg").',
19141914 'lockmanager-fail-openlock' => 'Parameters:
1915 -* $1 is a key name.',
 1915+* $1 is a resource path (e.g. "mwstore://media-public/a/ab/file.jpg").',
19161916 'lockmanager-fail-releaselock' => 'Parameters:
1917 -* $1 is a key name.',
1918 -'lockmanager-fail-acquirelocks' => 'Parameters:
1919 -* $1 is a list of key names.',
 1917+* $1 is a resource path (e.g. "mwstore://media-public/a/ab/file.jpg").',
19201918 'lockmanager-fail-db-bucket' => 'Parameters:
19211919 * $1 is a bucket name.',
19221920 'lockmanager-fail-db-release' => 'Parameters:
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -2254,13 +2254,12 @@
22552255 'backend-fail-create' => 'Could not create file $1.',
22562256
22572257 # Lock manager
2258 -'lockmanager-notlocked' => 'Could not unlock hash key "$1"; it is not locked.',
2259 -'lockmanager-fail-closelock' => 'Could not close lock file for hash key "$1".',
2260 -'lockmanager-fail-deletelock' => 'Could not delete lock file for hash key "$1".',
2261 -'lockmanager-fail-acquirelock' => 'Could not acquire lock for hash key "$1".',
2262 -'lockmanager-fail-openlock' => 'Could not open lock file for hash key "$1".',
2263 -'lockmanager-fail-releaselock' => 'Could not release lock for hash key "$1".',
2264 -'lockmanager-fail-acquirelocks' => 'Could not acquire locks for hash keys "$1".',
 2258+'lockmanager-notlocked' => 'Could not unlock "$1"; it is not locked.',
 2259+'lockmanager-fail-closelock' => 'Could not close lock file for "$1".',
 2260+'lockmanager-fail-deletelock' => 'Could not delete lock file for "$1".',
 2261+'lockmanager-fail-acquirelock' => 'Could not acquire lock for "$1".',
 2262+'lockmanager-fail-openlock' => 'Could not open lock file for "$1".',
 2263+'lockmanager-fail-releaselock' => 'Could not release lock for "$1".',
22652264 'lockmanager-fail-db-bucket' => 'Could not contact enough lock databases in bucket $1.',
22662265 'lockmanager-fail-db-release' => 'Could not release locks on database $1.',
22672266 'lockmanager-fail-svr-release' => 'Could not release locks on server $1.',

Follow-up revisions

RevisionCommit summaryAuthorDate
r107198Fix r107197: removed 'lockmanager-fail-acquirelocks' key from messages.incaaron00:57, 24 December 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r107195Use hash key instead of key for lock manager messages. It was confusing trans...siebrand00:23, 24 December 2011

Comments

#Comment by Siebrand (talk | contribs)   00:55, 24 December 2011

Key needs to be removed from messages.inc also.

#Comment by Hashar (talk | contribs)   21:45, 11 January 2012

> Key needs to be removed from messages.inc also.

Adressed in follow up r107198 :)

Status & tagging log