Percona Server 引入 MyRocks

来源:转载


看到「MyRocks Engine: Things to Know Before You Start
」这篇,才发现原来一月的时候Percona Server
就已经将MyRocks
GA (General Availability) 了:「Percona Server for MySQL 5.7.20-19 Is Now Available
」。


New Features: Now MyRocks Storage Engine has General Availability status.

在二月这篇文章里面有提到一些重点,像是安装方式:


Now if you use Percona repositories, you can simply install MyRocks plugin and enable it with ps-admin --enable-rocksdb.

另外文章里也提到了重要的差异 (在「What other differences should you be aware of?」这段),像是他并不是每个 table 都一个档案,而是像早期 InnoDB 的作法,整个一包:


Let’s look at the directory layout. Right now, all tables and all databases are stored in a hidden .rocksdb directory inside mysqldir. The name and location can be changed, but still all tables from all databases are stored in just a series of .sst files. There is no per-table / per-database separation.


另外提到可以看到 Engine 的代码是ROCKSDB
(从ENGINE=ROCKSDB
那段看到的)。然后是 Isolation level 的支援度,只有READ-COMMITTED
与SERIALIZABLE
,没有REPEATABLE-READ


Keep in mind that at this time MyRocks supports only READ-COMMITTED and SERIALIZABLE isolation levels. There is no REPEATABLE-READ isolation level and no gap locking like in InnoDB. In theory, RocksDB should support SNAPSHOT isolation level. However, there is no notion of SNAPSHOT isolation in MySQL so we have not implemented the special syntax to support this level. Please let us know if you would be interested in this.

然后 bulk load 在资料量超过记忆体大小时会有已知的 crash 问题:


For bulk loads, you may face problems trying to load large amounts of data into MyRocks (and unfortunately this might be the very first operation when you start playing with MyRocks as you try to LOAD DATA, INSERT INTO myrocks_table SELECT * FROM innodb_table or ALTER TABLE innodb_table ENGINE=ROCKSDB). If your table is big enough and you do not have enough memory, RocksDB crashes. As a workaround, you should set rocksdb_bulk_load=1 for the session where you load data.


然后目前没有像XtraBackup
的工具可以用,现阶段如果要备份的话得透过传统的方式来做 (mysqldump 或是 filesystem snapshot):


Right now there is no hot backup software like Percona XtraBackup to perform a hot backup of MyRocks tables (we are looking into this). At this time you can use mysqldump for logical backups, or use filesystem-level snapshots like LVM or ZFS.

想来找机会测试看看两者差异...


分享给朋友:
您可能感兴趣的文章:
随机阅读: