TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Clarification on “Call Me Maybe: MariaDB Galera Cluster”

62 pointsby crivabeneover 9 years ago

12 comments

infinotizeover 9 years ago
Besides being a super well-written and interesting series technically, the Call Me Maybe blogs have been very revealing as far as different organizations' response to criticism. Especially considering all of the target applications are open source, the project maintainers should be profusely thankful someone has taken the time for such thorough analysis, presumably much deeper than the maintainers themselves appear to have done at least on consistency behavior, to reveal bugs which should ultimately make it that much stronger.
评论 #10239172 未加载
tptacekover 9 years ago
<i>I do not quite like the usage of the word “corrupted” here. For me, the more correct word be to use is “inconsistent”.</i><p>Aren&#x27;t we talking about situations in which a database tracking account balances creates money out of thin air, or vaporizes it unexpectedly?<p>I feel like Aphyr is always at pains to talk about the real-world implications of these findings --- not just how bad they are in sensitive applications, but also the kinds of places you can get away with these &quot;inconsistencies&quot;.
评论 #10238828 未加载
评论 #10238840 未加载
评论 #10238780 未加载
评论 #10238759 未加载
评论 #10240774 未加载
评论 #10238779 未加载
MichaelGGover 9 years ago
Am I missing something or does this not address the main issue the original article raised: The documentation is simply incorrect. It claims to support SNAPSHOT ISOLATION but does not. The company knows this and even this article says the behaviour &quot;is totally expected&quot;.<p>Seems like the first response should be to fix the docs and not claim capabilities beyond what&#x27;s implemented.<p>(Also it was pretty clear from the original article that corrupted data meant the balances were incorrect, not that the file was corrupted like a bad checksum.)
评论 #10239098 未加载
评论 #10239502 未加载
评论 #10239013 未加载
rushi_agrawalover 9 years ago
Below are the tweets by Aphyr for the same thing (with language slightly toned down). I never thought I won&#x27;t find their mention here on HN. :) Nevertheless, precise, to the point:<p>Buncha people giving me &lt;filth&gt; for calling data written through an invariant violation &quot;corrupted state&quot;, like somehow it&#x27;s not garbage.<p>If TCP checksums don&#x27;t work right we don&#x27;t call the packet &quot;inconsistent.&quot; We call it corrupt. If a disk shuffles your file&#x27;s bits? Corrupt.<p>I use the word corrupt to emphasize that not only has the system &lt;messed&gt; up, but you have <i>no way to know</i> your data is now &lt;messed&gt; up.
评论 #10239633 未加载
评论 #10240069 未加载
PeterZaitsevover 9 years ago
There are many approaches to data consistency, including for example Eventual consistency, not only in databases but in any parallel programming. Different CPU architectures for example for years provided different memory consistency models with trade-offs of performance and being usable for application programmers.<p>It is important however behavior in this case is clearly documented.<p>I think there is decent documentation about Innodb describing how transactions work in Innodb <a href="http:&#x2F;&#x2F;dev.mysql.com&#x2F;doc&#x2F;refman&#x2F;5.7&#x2F;en&#x2F;innodb-transaction-model.html" rel="nofollow">http:&#x2F;&#x2F;dev.mysql.com&#x2F;doc&#x2F;refman&#x2F;5.7&#x2F;en&#x2F;innodb-transaction-mo...</a><p>Galera would benefit having more clear documentation about what data consistency model exactly it provides.<p>At the same time Percona XtraDB Cluster, MariaDB Cluster can be used to built reliable applications assuming you&#x27;re writing to their consistency model correctly.
moominover 9 years ago
I think he&#x27;s trying to define &quot;corrupted&quot; data as completely inaccessible data (because of file corruption, presumably). However, if I zip up a picture of PaulGraham.jpg and when I unzip it I get one of Iron Man, I think I&#x27;d be within my rights to call the data corrupt.
creshalover 9 years ago
&gt; If you use this in a real life, the more obvious way to write these transactions is:<p>Is it? Do ORMs really do that, or is it one of those &quot;SQL was designed to be used this way, but nobody using SQL read the design documents&quot; cases?
评论 #10239004 未加载
评论 #10238817 未加载
评论 #10238880 未加载
评论 #10238772 未加载
评论 #10238788 未加载
评论 #10238830 未加载
AlisdairOover 9 years ago
Edit: ignore this, it&#x27;s addressing a completely different situation, and I clearly didn&#x27;t read the article well enough. The code in the article writes all of the locations it reads, so true SI ought to keep you safe. My apologies!<p>Yet another edit: huh, it seems that InnoDB in RR doesn&#x27;t rollback when you write to a row that&#x27;s been written since you started the transaction. TIL.<p>--------<p>It&#x27;s worth noting here that (AFAIR) Oracle&#x27;s &#x27;SERIALIZABLE&#x27; (actually SI) level suffers from this exact write skew vulnerability, so MySQL&#x2F;MariaDB is not alone in this issue. As pointed out, SELECT FOR UPDATE is a commonly used remedy.<p>What it comes down to is that while re-reading data in a given transaction under SI will give you the same result, <i>it doesn&#x27;t guarantee that the data in the DB itself has stayed constant</i>. If you want to guarantee that the data won&#x27;t change, you need to lock it.<p>IIRC this also applies to PostgreSQL&#x27;s REPEATABLE READ level.
评论 #10238974 未加载
eisover 9 years ago
A lot of defensive talking around technical terms, mixed with a bunch of typos and topped off with unfair attacks.<p>Not very classy. And the point of Aphyr still stands I think. In default mode it is easy to get corrupt data with Galera Cluster. That InnoDB on a single instance can have the same problem makes it all the more troubling and I&#x27;m glad I moved away from MySQL a long time ago.
sagichmalover 9 years ago
&gt; Following that conclusion is using Galera cluster may result in “corrupted” data. I do not quite like the usage of the word “corrupted” here. For me, the more correct word be to use is “inconsistent”.<p>But Aphyr never once uses the term &quot;corrupted data&quot;, or the word &quot;corrupted&quot;. If you&#x27;re going to quote an article, it&#x27;s important to be precise.<p>This response feels panicked, or at least rushed. And it really misses the point. You can&#x27;t, or shouldn&#x27;t, try to explain away these types of findings as irrelevant, or just an issue of semantics. Instead, I&#x27;d hope by now that technical folks on the receiving end of a Call Me Maybe analysis would have learned that there&#x27;s precisely one correct way to respond: acknowledge the faults, clarify relevant documentation, and file (and link to) issues in public issue-trackers that will address the problems.<p>HashiCorp, CoreOS, and arguably Elastic played it correctly. Aerospike, Mesos, and now Percona, didn&#x27;t. Shame.
评论 #10238910 未加载
评论 #10238893 未加载
评论 #10238918 未加载
wglbover 9 years ago
How is <i>inconsistent</i> different than <i>just plain wrong</i>?<p>This may be another example of reactions to Aphyr&#x27;s reports telling about the mental model of the developers.
bakhyover 9 years ago
doesn&#x27;t this &quot;solution&quot; here actually still leave wide open the possibility of <i>reading</i> inconsistent data?