One of the issues that made debugging #937284: DEADLOCK errors on MergeQuery INSERT due to InnoDB gap locking when condition in SELECT ... FOR UPDATE results in 0 rows much more difficult was that an exception was being thrown in MergeQuery::execute(), but the set() method was eating the exception. Unfortunately, we can't use watchdog() since we have to assume the database is inaccessible and most won't have syslog running. Instead, the attached simply logs to the error log so at least there is a record of the exception somewhere.

Comments

deviantintegral’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, log-set-exception-8.x.patch, failed testing.

tim.plunkett’s picture

All of the failures are the result of the error_log() itself. They're not caught by simpletest. Should they be?

Or, is this just revealing more bugs?

damien tournoud’s picture

We don't use straight error_log() anywhere, with good reasons.

If we want this, it should be a fallback directly inside the dblog module, not buried in the cache implementation.

deviantintegral’s picture

If we shouldn't use error_log(), what should dblog fall back to?

tim.plunkett’s picture

Category: bug » task

I wouldn't call this a bug.

tim.plunkett’s picture

Category: task » feature

This isn't a task, either.

dawehner’s picture

Issue summary: View changes
Status: Needs work » Fixed

We do no longer just catch but actually rethrow.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.