LSM-Tree(52)

4.2. Recovery in the LSM-tree(2)

To demonstrate recovery of the LSM-tree index, it is important that we carefully define the form of a checkpoint and demonstrate that we know where to start in the sequential log file, and how to apply successive logs, so as to deterministically replicate updates to the index that need to be recovered. The scheme we use is as follows. When a checkpoint is requested at time T0, we complete all merge steps in operation so that node locks are released, then postpone all new entry inserts to the LSM-tree until the checkpoint completes; at this point we create an LSM- tree checkpoint with the following actions.
证明复苏LSM-tree指数的,重要的是,我们仔细定义的形式的一个检查站,并证明我们知道从哪里开始顺序日志文件,和如何应用连续日志,以确定性复制更新索引需要恢复。我们使用的方案如下。当在T0时刻请求检查点时,我们完成操作中的所有合并步骤,释放节点锁,然后推迟所有新条目插入到LSM-tree中,直到检查点完成;此时,我们使用以下操作创建一个LSM树检查点。(有道翻译)

  • We write the contents of component C0 to a known disk location; following this, entry inserts to C0 can begin again, but merge steps continue to be deferred.
    我们将组件C0的内容写入一个已知的磁盘位置;在此之后,可以再次开始向C0插入条目,但合并步骤将继续延迟。(有道翻译)
  • We flush to disk all dirty memory buffered nodes of disk based components.
    我们将基于磁盘组件的所有脏内存缓冲节点刷新到磁盘。
  • We create a special checkpoint log with the following information:
    创建带有如下信息的checkpoint:
    • The Log Sequence Number, LSN0, of the last inserted indexed row at time T0
      T0时刻最后插入的索引行的日志序列号LSN0
    • The disk addresses of the roots of all components
      组件roots地址
    • The location of all merge cursors in the various components
      合并操作cursors位置
    • The current information for dynamic allocation of new multi-page blocks.
      当前动态申请的多页块信息

你可能感兴趣的:(LSM-Tree(52))