Comments on: Amazon Aurora – Looking Deeper https://www.percona.com/blog/amazon-aurora-looking-deeper/ Fri, 16 Feb 2024 23:01:42 +0000 hourly 1 https://wordpress.org/?v=6.5.2 By: Harish Naik https://www.percona.com/blog/amazon-aurora-looking-deeper/#comment-10968134 Mon, 05 Jun 2017 07:48:10 +0000 https://www.percona.com/blog/?p=32483#comment-10968134 Vadim, Anurag,

With innodb_doublewrite OFF, can it cause data corruption in Aurora.

Because we are currently doing MySQL 5.6.3* vs Aurora benchmark.

One of the test was record insertion (2 days ago) -> MySQL 5.6.3* without raid and innodb_doublewrite = 0 and innodb_flush_log_at_trx_commit = 0 performing better than Aurora (We have a SP that does those kind of inserts).

And https://bugs.mysql.com/bug.php?id=78853, is fixed in MySQL 5.6.30 and not in current version of Aurora (Which i myself have tested and verified).

So here we are still thinking between MySQL 5.6.3* vs Aurora.

what are the risk factors in Aurora having innodb_doublewrite = 0? Can it cause data corruption or result in any kind of data loss ?

It would be great if you could please suggest your thoughts on it.

Thanks in Advance,
Harish

]]>
By: Nils https://www.percona.com/blog/amazon-aurora-looking-deeper/#comment-10967912 Fri, 24 Mar 2017 11:39:43 +0000 https://www.percona.com/blog/?p=32483#comment-10967912 There is a license that would prevent this (AGPL), butone must also wonder how useful having the source code would be without having access to the proprietary infrastructure behind it.

]]>
By: Matthew Weiler https://www.percona.com/blog/amazon-aurora-looking-deeper/#comment-10967694 Wed, 08 Feb 2017 17:55:17 +0000 https://www.percona.com/blog/?p=32483#comment-10967694 Wow, that “running in the cloud” GPLv2 loophole is extremely sketchy and I hope they plug that in the next version of GPL. However, that won’t stop Amazon from using what they already have.

It feels very wrong how Amazon is using open-source code to create a closed-source system. While what they’re doing is legally ok, it certainly feels like it violates the spirit of the licensing agreement.

]]>
By: Geronimo https://www.percona.com/blog/amazon-aurora-looking-deeper/#comment-10965966 Sun, 06 Mar 2016 04:47:49 +0000 https://www.percona.com/blog/?p=32483#comment-10965966 Update queries seems super slow in Aurora. My table1 has 6 millions records and I’m executing this update table1 set comment=’rejected’ where id in (select id from table2) — it took almost 2hours to run.

table2 has 2000 records only.

]]>
By: MAEDA Atsushi https://www.percona.com/blog/amazon-aurora-looking-deeper/#comment-10965656 Sun, 06 Dec 2015 22:06:58 +0000 https://www.percona.com/blog/?p=32483#comment-10965656 Thank you for your interesting article.

I translated this article for users in Japan
https://yakst.com/ja/posts/3550

If there is any problem, please contact me.
Thank you again.

]]>
By: Vadim Tkachenko https://www.percona.com/blog/amazon-aurora-looking-deeper/#comment-10965593 Tue, 24 Nov 2015 00:45:49 +0000 https://www.percona.com/blog/?p=32483#comment-10965593 Georg,

My read of GPLv2 (I am not a lawyer either, so this should not be taken as a legal advise in anyway, only as my personal opinion)
is that GPLv2 requires to open source code only if you distribute software as by downloads or by hard copies (USB drives, network routers, etc).

The model, where you launch software by a mouse click, does not fit into GPLv2 distribution requirement.

]]>
By: Georg https://www.percona.com/blog/amazon-aurora-looking-deeper/#comment-10965591 Mon, 23 Nov 2015 21:00:40 +0000 https://www.percona.com/blog/?p=32483#comment-10965591 If I login to Aurora,status (that is \s in command line client) indicates, that I’m using GPL licensed software:

Your MySQL connection id is 82422
Server version: 5.6.10 MySQL Community Server (GPL)

I’m not a lawyer, but I would expect that it is open source (no, I didn’t try to find source code).

]]>
By: Anurag Gupta https://www.percona.com/blog/amazon-aurora-looking-deeper/#comment-10965586 Sun, 22 Nov 2015 18:49:27 +0000 https://www.percona.com/blog/?p=32483#comment-10965586 Vadim, IMO, the first responsibility of a replication scheme is to ensure that the replica sees the same data as the master. That’s hard to do in any logical replication scheme (e.g. bin log replication), particularly so in MySQL where replication is not cognizant of ordering happening within the storage engine. For that reason (amongst others), I tend to favor physical (redo-based) replication for most customer use cases. Aurora does support bin log replication, both as source and as target, for customers who need the flexibility afforded by logical replication.

The specific example you provide isn’t currently supported by Aurora under physical replication, though of course you can set up bin log replication to accomplish this. There isn’t an intrinsic reason for this to be the case. The selects on the replica are implemented as you’d expect – setting a read view and applying undo to obtain the read view version of a block if the current version is in future of the view – so read committed vs repeatable read is a matter of not resetting the read view with a subsequent statement. We’ll consider it if we hear customer demand.

]]>
By: Anurag Gupta https://www.percona.com/blog/amazon-aurora-looking-deeper/#comment-10965585 Sun, 22 Nov 2015 18:36:04 +0000 https://www.percona.com/blog/?p=32483#comment-10965585 Mark, turns out we _do_ support flush_log_at_txn_commit=2. It was a post-launch fix based on customer request. Apologies for the incorrect info.

]]>
By: Danny Fallon https://www.percona.com/blog/amazon-aurora-looking-deeper/#comment-10965576 Wed, 18 Nov 2015 11:40:47 +0000 https://www.percona.com/blog/?p=32483#comment-10965576 Anurag,

While performance schema can be enabled for Aurora the current advice from Amazon is to not do that – there appears to be a problem with erroneous failovers in cluster when it’s turned on. I hope you fix this one soon. Vadim, slow query logs are certainly available and were critical in helping us diagnose a problem with binary log purging on Aurora last week. Only FILE logging is supported.

]]>
By: Vadim Tkachenko https://www.percona.com/blog/amazon-aurora-looking-deeper/#comment-10965572 Wed, 18 Nov 2015 01:18:31 +0000 https://www.percona.com/blog/?p=32483#comment-10965572 Anurag,

Thank you for all followup comments.

I do not quite follow re: changing an isolation mode on Writer.
It is gives a great flexibility of you can change an isolation mode *per transaction*.
That is some *READ-ONLY* transactions on Reader I would like to run in Repeatable-Read, and some other in Read-Commited. Is it possible?

]]>
By: Anurag Gupta https://www.percona.com/blog/amazon-aurora-looking-deeper/#comment-10965571 Tue, 17 Nov 2015 20:51:22 +0000 https://www.percona.com/blog/?p=32483#comment-10965571 Mark, Aurora provides InnoDB-style repeatable reads.

Vadim, we provide release notes with each patch. I’ll ask my team to ensure they provide sufficient detail to understand which bugs we’ve fixed. And use a better version scheme.

]]>
By: Anurag Gupta https://www.percona.com/blog/amazon-aurora-looking-deeper/#comment-10965570 Tue, 17 Nov 2015 20:39:59 +0000 https://www.percona.com/blog/?p=32483#comment-10965570 Mark, I’ll take a look at my biases related to flush_log_at_txn_commit=2. I’ve seen a small number of customers leveraging it to improve write throughput and it is certainly an easy win for us if we were to enable it in Aurora. I have a niggling suspicion that it leaves open the possibility of metadata/data corruptions, but can explore whether that is true or not.

]]>
By: Anurag Gupta https://www.percona.com/blog/amazon-aurora-looking-deeper/#comment-10965569 Tue, 17 Nov 2015 20:33:52 +0000 https://www.percona.com/blog/?p=32483#comment-10965569 a couple of other quick points.

Aurora does support performance schema – we just turn it off by default as it, as currently implemented, has significant overhead in MySQL (IMO).

On transaction isolation, you can change the isolation level on the write-master node and should see all the behavior you’d expect. The anomaly you’re seeing is on the read-replica, which 1) is read-only, and 2) inherits the write-ordering semantics of the write-master node. I would agree that the behavior is not intuitive, and we’ll put in a better error message.

I should add that writes are not synchronous as you assumed and would recommend you take a look at my talk from 2015 reInvent (you can find it on YouTube searching for DAT405), where I describe how write processing works in some detail. Basically, everything is async, including read replicas (which is where the lag comes from), but is all based on redo log records. We’re very focused on building a highly concurrent, high throughput system, and batching and asynchronous processing are basic techniques in doing so.

I also agree that we can do a better job with the version string, and will take a look at updating it.

]]>
By: ehdf https://www.percona.com/blog/amazon-aurora-looking-deeper/#comment-10965567 Tue, 17 Nov 2015 07:51:50 +0000 https://www.percona.com/blog/?p=32483#comment-10965567 I have been poking around for my queries on Amazon Aurora on varies platforms on internet but glad I got a more formal version of the answer right here. Looking forward to more improvements in future, good to see Aurora is addressing the bugs in real time.

]]>
By: Mark Callaghan https://www.percona.com/blog/amazon-aurora-looking-deeper/#comment-10965566 Tue, 17 Nov 2015 02:38:43 +0000 https://www.percona.com/blog/?p=32483#comment-10965566 Anurag – flush_log_at_txn_commit=0 is a benchmark special, but flush_log_at_txn_commit=2 is not and there are many deployments that benefit from it

]]>
By: Bill Karwin https://www.percona.com/blog/amazon-aurora-looking-deeper/#comment-10965564 Tue, 17 Nov 2015 00:54:50 +0000 https://www.percona.com/blog/?p=32483#comment-10965564 Interesting that they have invented InnoDB version 1.2.10. According to Chris Calendar’s nice blog post (http://www.chriscalender.com/innodb-plugin-versions/), such a version never existed. MySQL 5.6.10 started the practice of synchronized InnoDB versions.

]]>
By: Vadim Tkachenko https://www.percona.com/blog/amazon-aurora-looking-deeper/#comment-10965563 Tue, 17 Nov 2015 00:52:53 +0000 https://www.percona.com/blog/?p=32483#comment-10965563 Anurag,

Thank you for the comment.
As I understand there is no changelog and versions to understand what bugs where fixed in which version?

]]>
By: Vadim Tkachenko https://www.percona.com/blog/amazon-aurora-looking-deeper/#comment-10965562 Tue, 17 Nov 2015 00:50:46 +0000 https://www.percona.com/blog/?p=32483#comment-10965562 Mark,

Aurora is heavily modified InnoDB, so on a Writer it should work InnoDB-like (I did not test this actually). And Reader does not support statements that change data, I do not think we can actually test this. Still it would make sense to make InnoDB-like snapshots…

]]>
By: Anurag Gupta https://www.percona.com/blog/amazon-aurora-looking-deeper/#comment-10965561 Mon, 16 Nov 2015 23:57:14 +0000 https://www.percona.com/blog/?p=32483#comment-10965561 We’ve pulled back a hundred or so bug fixes. A number of the others aren’t applicable given the extensive changes to the code base. We’ll look into the specific ones you mention and pull them in if they’re not already in an upcoming patch.

Buffer page writes are zero because Aurora only writes log pages to the storage tier. That tier generates data block records on its own (similar to how log-structured storage systems work). No checkpointing or writing of dirty data blocks out of cache is required.

We disable flush_log_at_txn_commit modifications because it seemed like just a benchmark performance hack – it’s hard to believe a customer could really tolerate this in a real production system. It’s easy to reenable if it turns out that real customers want it.

We have our own CRC system which is pretty deeply integrated into how we write over the network, store data, scrub blocks etc. Which is why the MySQL checksum approach is disabled.

We’ll look into the other behavior anomalies you encountered.

]]>