diff options
Diffstat (limited to '.html/mysql/broken-xa.html')
| -rw-r--r-- | .html/mysql/broken-xa.html | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/.html/mysql/broken-xa.html b/.html/mysql/broken-xa.html new file mode 100644 index 0000000..b9a3568 --- /dev/null +++ b/.html/mysql/broken-xa.html @@ -0,0 +1,115 @@ +<!DOCTYPE html> +<html> +<head> + <title> + The Codex » + MySQL's Two-Phase Commit Implementation Is Broken + </title> + + <link + rel='stylesheet' + type='text/css' + href='http://fonts.googleapis.com/css?family=Buenard:400,700&subset=latin,latin-ext'> + <link + rel="stylesheet" + type="text/css" + href="../media/css/reset.css"> + <link + rel="stylesheet" + type="text/css" + href="../media/css/grimoire.css"> +</head> +<body> + +<div id="shell"> + + <ol id="breadcrumbs"> + + <li class="crumb-0 not-last"> + + <a href="../">index</a> + + </li> + + <li class="crumb-1 not-last"> + + <a href="./">mysql</a> + + </li> + + <li class="crumb-2 last"> + + broken-xa + + </li> + + </ol> + + + + <div id="article"> + <h1 id="mysqls-two-phase-commit-implementation-is-broken">MySQL's Two-Phase Commit Implementation Is Broken</h1> +<p>From <a href="http://dev.mysql.com/doc/refman/5.5/en/xa-restrictions.html">the fine +manual</a>:</p> +<blockquote> +<p>If an XA transaction has reached the PREPARED state and the MySQL server is +killed (for example, with kill -9 on Unix) or shuts down abnormally, the +transaction can be continued after the server restarts. However, if the +client reconnects and commits the transaction, the transaction will be +absent from the binary log even though it has been committed. This means the +data and the binary log have gone out of synchrony. An implication is that +<strong>XA cannot be used safely together with replication</strong>.</p> +</blockquote> +<p>(Emphasis mine.)</p> +<p>If you're solving the kinds of problems where two-phase commit and XA +transaction management look attractive, then you very likely have the kinds of +uptime requirements that make replication mandatory. “It works, but not with +replication” is effectively “it doesn't work.”</p> +<blockquote> +<p>It is possible that the server will roll back a pending XA transaction, even +one that has reached the PREPARED state. This happens if a client connection +terminates and the server continues to run, or if clients are connected and +the server shuts down gracefully.</p> +</blockquote> +<p>XA transaction managers assume that if every resource successfully reaches the +PREPARED state, then every resource will be able to commit the transaction +“eventually.” Resources that unilaterally roll back PREPARED transactions +violate this assumption pretty badly.</p> + </div> + + + +<div id="comments"> +<div id="disqus_thread"></div> +<script type="text/javascript"> + /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */ + var disqus_shortname = 'grimoire'; // required: replace example with your forum shortname + + /* * * DON'T EDIT BELOW THIS LINE * * */ + (function() { + var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; + dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js'; + (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); + })(); +</script> +<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> +<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a> +</div> + + + + <div id="footer"> + <p> + + The Codex — + + Powered by <a href="http://markdoc.org/">Markdoc</a>. + +<a href="https://bitbucket.org/ojacobson/grimoire.ca/src/master/wiki/mysql/broken-xa.md">See this page on Bitbucket</a> (<a href="https://bitbucket.org/ojacobson/grimoire.ca/history-node/master/wiki/mysql/broken-xa.md">history</a>). + + </p> + </div> + +</div> +</body> +</html>
\ No newline at end of file |
