Last modified: 2013-03-20 09:14:04 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T35036, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 33036 - find a better fix on LoadBalancer connection error
find a better fix on LoadBalancer connection error
Status: NEW
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
1.20.x
All All
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
: platformeng
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-13 17:15 UTC by Antoine "hashar" Musso (WMF)
Modified: 2013-03-20 09:14 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Antoine "hashar" Musso (WMF) 2011-12-13 17:15:19 UTC
Bug 29233 has been fixed by Tim with r90266 in REL1_17 and r96517 in trunk.

The commit message ask for a cleaner way to handle a database connection error:

Temporary fix which roughly restores the 1.16 behaviour of openConnection(), returning a Database object with mOpened = false if the connection fails. However, the idea of throwing an exception from a constructor and then holding on to a reference to the constructed object by saving it in the exception object seems kind of icky. Needs a better fix in trunk. 

Code snippet:


try {
    $db = DatabaseBase::newFromType( $server['type'], $server );
} catch ( DBConnectionError $e ) {
    // FIXME: This is probably the ugliest thing I have ever done to 
    // PHP. I'm half-expecting it to segfault, just out of disgust. -- TS    $db = $e->db;
}
Comment 1 Andre Klapper 2013-03-18 15:42:08 UTC
Antoine: Is this still valid, and would you work on this at some point? 
If not, any idea who could tackle this?
Comment 2 Antoine "hashar" Musso (WMF) 2013-03-20 09:14:04 UTC
This bug is merely a copy paste of what Tim said on review of r90266 ( https://www.mediawiki.org/wiki/Special:Code/MediaWiki/90266#c19929 ) so we do not forget about it.  I have no plan to work on it nor I think it is important, maybe we will get it done one day.

Feel free to lower the priority.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links