在对InnoDB数据存储进行研究期间发现的InnoDB错误

During the process of researching InnoDB’s storage formats and building the innodb_ruby and innodb_diagrams projects discussed in my series of InnoDB blog posts, Davi Arnaut and I found a number of InnoDB bugs. I thought I’d bring up a few of them, as they are fairly interesting.

在研究InnoDB的存储格式并构建innodb_rubyinnodb_diagrams项目期间,我和Davi Arnaut发现了一些InnoDB的bug。我想提出其中的一些,因为它们相当有趣。

These bugs were largely discoverable due to the innodb_space utility making important internal information visible in a way that it had never been visible in the past. Using it to examine production tables provided many leads to go on to find the bugs responsible. When we initially looked at a graphical plot of free space by page produced from innodb_space data, we were quite surprised to see so many pages less than half filled (including many nearly empty). After much research we were able to track down all of the causes for the anomalies we discovered.

这些错误主要是由于innodb_space实用程序以一种以往从未可见的方式显示重要的内部信息,因此可以发现。使用它来检查生产表提供了许多线索,以找到负责的错误。当我们最初查看从innodb_space数据生成的页面的空闲空间的图形图时,我们非常惊讶地看到有这么多不到一半填充的页面(包括许多几乎为空的页面)。经过深入研究,我们能够找到我们发现的所有异常的原因。

Bug #67718: InnoDB drastically under-fills pages in certain conditions

Bug #67718:在某些情况下,InnoDB严重不足页面

Due to overly-aggressive attempts to optimize page split based on insertion order during insertion, InnoDB could leave pages under-filled with as few as one record in each page. This was observed in several production systems in two cases which I believe could be quite common for others:

由于在插入期间基于插入顺序过于激进地尝试优化页面拆分,InnoDB可能会导致页面不足,每个页面只有一个记录。这在两个案例的几个生产系统中观察到,我相信对其他系统也可能很常见:

  1. Mostly-increasing keys — Twitter uses Snowflake for ID generation in a distributed way. Overall it’s quite nice. Snowflake generates 64-bit mostly-incrementing IDs that contain a timestamp component. Insertion is typically happening via queues and other non-immediate mechanisms, so IDs will find their way to the database slightly out of order.
  2. 递增键 — Twitter使用Snowflake以分布式方式生成ID。总体来说,它非常好用。Snowflake生成64位递增的ID,其中包含一个时间戳组件。插入通常通过队列和其他非即时机制进行,因此ID...
开通本站会员,查看完整译文。

首页 - Wiki
Copyright © 2011-2024 iteam. Current version is 2.129.0. UTC+08:00, 2024-07-05 04:02
浙ICP备14020137号-1 $访客地图$