Aaron Schulz has uploaded a new change for review.
https://gerrit.wikimedia.org/r/79852
Change subject: Added a few more trx sanity checks to DatabaseBase
......................................................................
Added a few more trx sanity checks to DatabaseBase
Change-Id: Idc4d9e4a89fcee28bd4b18ad6d8c6b09b9fe7e75
---
M includes/db/Database.php
1 file changed, 9 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/52/79852/1
diff --git a/includes/db/Database.php b/includes/db/Database.php
index 623010f..88f014e 100644
--- a/includes/db/Database.php
+++ b/includes/db/Database.php
@@ -3233,6 +3233,7 @@
if ( $this->mTrxDoneWrites ) {
Profiler::instance()->transactionWritingOut(
$this->mServer, $this->mDBname );
}
+ $this->mTrxDoneWrites = false;
$this->runOnTransactionIdleCallbacks();
}
@@ -3267,6 +3268,7 @@
if ( $this->mTrxDoneWrites ) {
Profiler::instance()->transactionWritingOut(
$this->mServer, $this->mDBname );
}
+ $this->mTrxDoneWrites = false;
}
/**
@@ -3851,9 +3853,15 @@
return (string)$this->mConn;
}
+ /**
+ * Run a few simple sanity checks
+ */
public function __destruct() {
+ if ( $this->mTrxLevel && $this->mTrxDoneWrites ) {
+ trigger_error( "DB transaction with writes still
pending." );
+ }
if ( count( $this->mTrxIdleCallbacks ) || count(
$this->mTrxPreCommitCallbacks ) ) {
- trigger_error( "Transaction idle or pre-commit
callbacks still pending." ); // sanity
+ trigger_error( "DB transaction idle or pre-commit
callbacks still pending." );
}
}
}
--
To view, visit https://gerrit.wikimedia.org/r/79852
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idc4d9e4a89fcee28bd4b18ad6d8c6b09b9fe7e75
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits