-
Task
-
-
Critical
-
Resolution:
Fixed
-
-
-
Dispite prepare phase have been rich you will get nothing when doing a xa recover if the client get disconnected befor commit
In the following php script an error is generated to force the COMMIT to failed cf:XA COMMITEE and close the connection.
|
<?php
|
|
$dt = date_create();
|
$xid = date_timestamp_get($dt);
|
echo "xid : ".$xid;
|
|
$logger1 = new mysqli('localhost', 'root', 'xxxxx', 'test');
|
if (mysqli_connect_error()) {
|
die('Erreur de connexion (' . mysqli_connect_errno() . ') '. mysqli_connect_error());
|
}
|
$potest = new mysqli('192.168.45.166', 'test', 'xxxxxxx', 'test');
|
if (mysqli_connect_error()) {
|
$logger1->close();
|
die('Erreur de connexion (' . mysqli_connect_errno() . ') '. mysqli_connect_error());
|
}
|
|
echo 'SuccËs logger1 ' . $logger1->host_info . "\n";
|
echo 'SuccËs potest ' . $potest->host_info . "\n";
|
|
|
##################################
|
$queryXA = 'XA START "'.$xid.'"';
|
|
$queryRes = $logger1->query($queryXA);
|
if (!$queryRes) {
|
$message = 'RequÍte invalide logger1: ' . $logger1->error . "\n";
|
$message .= 'RequÍte complËte : ' . $queryXA;
|
$logger1->close();
|
$potest->close();
|
die($message);
|
}
|
$queryRes = $potest->query($queryXA);
|
if (!$queryRes) {
|
$message = 'RequÍte invalide potest: ' . $potest->error . "\n";
|
$message .= 'RequÍte complËte : ' . $queryXA;
|
$logger1->close();
|
$potest->close();
|
die($message);
|
}
|
##################################
|
|
|
##################################
|
$queryXA = 'INSERT INTO mthoxa(xamtho_tc) values ("'.$xid.'")';
|
$queryRes = $logger1->query($queryXA);
|
if (!$queryRes) {
|
$message = 'RequÍte invalide logger1: ' . $logger1->error . "\n";
|
$message .= 'RequÍte complËte : ' . $queryXA;
|
$logger1->close();
|
$potest->close();
|
die($message);
|
}
|
|
$queryRes = $potest->query($queryXA);
|
if (!$queryRes) {
|
$message = 'RequÍte invalide logger1: ' . $logger1->error . "\n";
|
$message .= 'RequÍte complËte : ' . $queryXA;
|
$logger1->close();
|
$potest->close();
|
die($message);
|
}
|
##################################
|
|
|
##################################
|
$queryXA = 'XA END "'.$xid.'"';
|
|
$queryRes = $logger1->query($queryXA);
|
if (!$queryRes) {
|
$message = 'RequÍte invalide logger1: ' . $logger1->error . "\n";
|
$message .= 'RequÍte complËte : ' . $queryXA;
|
$logger1->close();
|
$potest->close();
|
die($message);
|
}
|
$queryRes = $potest->query($queryXA);
|
if (!$queryRes) {
|
$message = 'RequÍte invalide potest: ' . $potest->error . "\n";
|
$message .= 'RequÍte complËte : ' . $queryXA;
|
$logger1->close();
|
$potest->close();
|
die($message);
|
}
|
##################################
|
|
|
##################################
|
$queryXA = 'XA PREPARE "'.$xid.'"';
|
$queryRes = $logger1->query($queryXA);
|
if (!$queryRes) {
|
$message = 'RequÍte invalide logger1: ' . $logger1->error . "\n";
|
$message .= 'RequÍte complËte : ' . $queryXA;
|
$logger1->close();
|
$potest->close();
|
die($message);
|
}
|
|
$queryRes = $potest->query($queryXA);
|
if (!$queryRes) {
|
$message = 'RequÍte invalide potest: ' . $potest->error . "\n";
|
$message .= 'RequÍte complËte : ' . $queryXA;
|
$logger1->close();
|
$potest->close();
|
die($message);
|
}
|
|
##################################
|
|
|
##################################
|
$queryXA = 'XA COMMIT "'.$xid.'"';
|
$queryRes = $logger1->query($queryXA);
|
if (!$queryRes) {
|
$message = 'RequÍte invalide logger1: ' . $logger1->error . "\n";
|
$message .= 'RequÍte complËte : ' . $queryXA;
|
$logger1->close();
|
$potest->close();
|
die($message);
|
}
|
|
$queryXA = 'XA COMMITEE "'.$xid.'"';
|
$queryRes = $potest->query($queryXA);
|
if (!$queryRes) {
|
$message = 'RequÍte invalide potest: ' . $potest->error . "\n";
|
$message .= 'RequÍte complËte : ' . $queryXA;
|
|
$queryXA = 'XA RECOVER';
|
$queryRes = $potest->query($queryXA);
|
while ($r=$queryRes->fetch_assoc())
|
print_r($r);
|
|
|
$logger1->close();
|
$potest->close();
|
die($message);
|
}
|
##################################
|
|
$logger1->close();
|
$potest->close();
|
|
echo "Finish !\n"
|
|
?>
|
{"report":{"fcp":1153.2999999523163,"ttfb":441.59999990463257,"pageVisibility":"visible","entityId":20816,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"998806d4-1e05-4075-b48e-621282d6f4b8","navigationType":0,"readyForUser":1322.5999999046326,"redirectCount":0,"resourceLoadedEnd":844.4000000953674,"resourceLoadedStart":447.40000009536743,"resourceTiming":[{"duration":91.19999980926514,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":447.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":447.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":538.5999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":92,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":447.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":447.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":539.5999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":284.2000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":447.7000000476837,"connectEnd":447.7000000476837,"connectStart":447.7000000476837,"domainLookupEnd":447.7000000476837,"domainLookupStart":447.7000000476837,"fetchStart":447.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":548.0999999046326,"responseEnd":731.9000000953674,"responseStart":576.5,"secureConnectionStart":447.7000000476837},{"duration":396.60000014305115,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":447.7999999523163,"connectEnd":447.7999999523163,"connectStart":447.7999999523163,"domainLookupEnd":447.7999999523163,"domainLookupStart":447.7999999523163,"fetchStart":447.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":548.5,"responseEnd":844.4000000953674,"responseStart":578.2999999523163,"secureConnectionStart":447.7999999523163},{"duration":131,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":448,"connectEnd":448,"connectStart":448,"domainLookupEnd":448,"domainLookupStart":448,"fetchStart":448,"redirectEnd":0,"redirectStart":0,"requestStart":548.5999999046326,"responseEnd":579,"responseStart":577.4000000953674,"secureConnectionStart":448},{"duration":133.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":448.09999990463257,"connectEnd":448.09999990463257,"connectStart":448.09999990463257,"domainLookupEnd":448.09999990463257,"domainLookupStart":448.09999990463257,"fetchStart":448.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":549,"responseEnd":581.9000000953674,"responseStart":580.7999999523163,"secureConnectionStart":448.09999990463257},{"duration":136.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":448.09999990463257,"connectEnd":448.09999990463257,"connectStart":448.09999990463257,"domainLookupEnd":448.09999990463257,"domainLookupStart":448.09999990463257,"fetchStart":448.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":550.2000000476837,"responseEnd":584.9000000953674,"responseStart":582.4000000953674,"secureConnectionStart":448.09999990463257},{"duration":95.29999995231628,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":448.2000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":448.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":543.5,"responseStart":0,"secureConnectionStart":0},{"duration":137.60000014305115,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":448.2999999523163,"connectEnd":448.2999999523163,"connectStart":448.2999999523163,"domainLookupEnd":448.2999999523163,"domainLookupStart":448.2999999523163,"fetchStart":448.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":551,"responseEnd":585.9000000953674,"responseStart":583.2999999523163,"secureConnectionStart":448.2999999523163},{"duration":95.90000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":448.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":448.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":544.4000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":137.60000014305115,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":448.59999990463257,"connectEnd":448.59999990463257,"connectStart":448.59999990463257,"domainLookupEnd":448.59999990463257,"domainLookupStart":448.59999990463257,"fetchStart":448.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":551.2999999523163,"responseEnd":586.2000000476837,"responseStart":584,"secureConnectionStart":448.59999990463257},{"duration":331,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":457.2000000476837,"connectEnd":457.2000000476837,"connectStart":457.2000000476837,"domainLookupEnd":457.2000000476837,"domainLookupStart":457.2000000476837,"fetchStart":457.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":597.9000000953674,"responseEnd":788.2000000476837,"responseStart":781.9000000953674,"secureConnectionStart":457.2000000476837},{"duration":331.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":457.2999999523163,"connectEnd":457.2999999523163,"connectStart":457.2999999523163,"domainLookupEnd":457.2999999523163,"domainLookupStart":457.2999999523163,"fetchStart":457.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":650.4000000953674,"responseEnd":789.2000000476837,"responseStart":784.7999999523163,"secureConnectionStart":457.2999999523163},{"duration":126.20000004768372,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":861.0999999046326,"connectEnd":861.0999999046326,"connectStart":861.0999999046326,"domainLookupEnd":861.0999999046326,"domainLookupStart":861.0999999046326,"fetchStart":861.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":956,"responseEnd":987.2999999523163,"responseStart":986.5,"secureConnectionStart":861.0999999046326},{"duration":315,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1073.5999999046326,"connectEnd":1073.5999999046326,"connectStart":1073.5999999046326,"domainLookupEnd":1073.5999999046326,"domainLookupStart":1073.5999999046326,"fetchStart":1073.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":1354.5999999046326,"responseEnd":1388.5999999046326,"responseStart":1387.7999999523163,"secureConnectionStart":1073.5999999046326}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":190,"responseStart":442,"responseEnd":455,"domLoading":445,"domInteractive":1380,"domContentLoadedEventStart":1380,"domContentLoadedEventEnd":1432,"domComplete":1905,"loadEventStart":1905,"loadEventEnd":1905,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1352.7000000476837},{"name":"bigPipe.sidebar-id.end","time":1353.5},{"name":"bigPipe.activity-panel-pipe-id.start","time":1354.4000000953674},{"name":"bigPipe.activity-panel-pipe-id.end","time":1355.7999999523163},{"name":"activityTabFullyLoaded","time":1450.5}],"measures":[],"correlationId":"726ff2d5c43dc2","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":165,"dbReadsTimeInMs":89,"dbConnsTimeInMs":101,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}