转自 http://blog.csdn.net/launch_225/article/details/7523195

假设我们的数据库遇到以下情况:

第一, 没有备份;

第二, 常规方法无法恢复;

第三, 数据很重要, 但又无法或成本太高而进行重新输入. 如丢失了Oracle的System表空间, System表空间损坏到无法启动的地步, 意外删除表空间或表, 意外截断(Truncate)表等,

在这3中情况下, 最后的方法就是通过工具直接读取数据文件里的数据,将我们的数据找回来。并且工具不需要Oracle 环境的支持。

据我目前的了解,有3种工具:

(1)Oracle 的内部工具是DUL(Data UnLoader)。 这个需要Oracle 的支持。

(2)老熊写的ODU。 网址:http://www.oracleodu.com/en/

(3)d.c.b.a (支付宝 楼方鑫)写的AUL. 网址:http://www.anysql.net/download

ODU 之前是免费的, 现在老熊和dbsnake 在维护ODU,需要购买才能使用。

d.c.b.a的AUL 是用C 语言写的, 免费版本最大只支持2个,最大256M的datafile。 如果是更大的datafile,也是需要购买授权。

能写出这样的软件都是牛人了,需要了解各个版本Oracle block的详细信息。 AUL 和 ODU的操作和Oracle DUL 类似。

关于DUL,MOS 有说明: MOS Note 72554.1

Using DUL to Recover fromDatabase Corruption

Table Of Contents
~~~~~~~~~~~~~~~~~
1. Introduction
2. Using DUL
  2.1 Create an appropriate init.dul file
  2.2 Create the control.dul file
  2.3 Unload the object information
  2.4 Invoke DUL
  2.5 Rebuild the database
3. How to rebuild object definitions that are stored in the data dictionary ?
4. How to unload data when the segment header block is corrupted ?
5. How to unload data when the file header block is corrupted ?
6. How to unload data without the system tablespace ?
7. Appendix A : Where to find the executables ?
8. References
 
1. Introduction
~~~~~~~~~~~~~~~
 
This document is to explain how to use DUL rather than to give a full
explanation of Bernard's Data UnLoader capabilities.
 
This document is for internal use only and should not be given to customers at
any time, Dul should always be used by or under the supervision of a support
analyst.
 
DUL (Data UnLoader) is intended to retrieve data from the Oracle Database that
cannot be retrieved otherwise. This is not an alternative for the export
utility or SQL*Loader. The database may be corrupted but an individual data
block used must be 100% correct. During all unloading checks are made to make
sure that blocks are not corrupted and belong to the correct segment. If a
corrupted block is detected by DUL, an error message is printed in the loader
file and to the standard output, but this will not terminate the unloading of
the next row or block.
 
2. Using DUL
~~~~~~~~~~~~
 
First you must retrieve the necessary information about the objects that exists
in the database, these statistics will be loaded into the DUL dictionary to
unload the database objects.
 
This information is retrieved from the USER$, OBJ$, TAB$ and COL$ tables that
were created at database creation time, they can be unloaded based on the fact
that object numbers are fixed for these tables due to the rigid nature of sql.
bsq. DUL can find the information in the system tablespace, therefor the system
tablespace datafile(s) must be included in the control file, if this datafile(s)
is not present see chapter 6.
 
 2.1 Create an appropriate "init.dul" file
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
    REM Platform specific parameters (NT)
    REM A List of parameters for the most common platforms can be obtained from
    REM http://www.nl.oracle.com/support/dul/index.html
    osd_big_endian_flag=false
    osd_dba_file_bits=10
    osd_c_struct_alignment=32
    osd_file_leader_size=1
    osd_word_size = 32
 
    REM Sizes of dul dictionary caches. If one of these is too low startup will
    REM fail.
    dc_columns=2000000
    dc_tables=10000
    dc_objects=1000000
    dc_users=400
    dc_segments=100000
 
    REM Location and filename of the control file, default value is control.dul
    REM in the current directory
    control_file = D:\Dul\control_orcl.dul
 
    REM Database blocksize, can be found in the init<SID>.ora file or can be
    REM retrieved by doing "show parameter %db_block_size%" in server manager
    REM (svrmgr23/30/l) changes this parameter to whatever the block size is of
    REM the crashed database.
    db_block_size=4096
 
    REM Can/must be specified when data is needed into export/import format.
    REM this will create a file suitable to use by the oracle import utility,
    REM although the generated file is completely different from a table mode
    REM export generated by the EXP utility. It is a single table dump file
    REM with only a create table structure statement and the table data.
    REM Grants, storage clauses, triggers are not included into this dump file !
    export_mode=true
 
    REM Compatible parameter must be specified an can be either 6, 7 or 8
    compatible=8
 
    REM This parameter is optional and can be specified on platforms that do
    REM not support long file names (e.g. 8.3 DOS) or when the file format that
    REM DUL uses "owner_name.table_name.ext" is not acceptable. The dump files
    REM will be something like dump001.ext, dump002.ext, etc in this case.
    file = dump
 
   A complete list can be obtained at http://www.nl.oracle.com/support/DUL/ucg8.
   html section "DUL Parameters" although this init.dul file will work in most
   cases and contains all accurate parameters to succesfully complete the
   unloading.
 
 2.2 Create the "control.dul" file
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
   A good knowledge about the logical tablespace and physical datafile
   structure is needed or you can do the following queries when the database
   is mounted :
 
    Oracle 6, 7
    -----------
    > connect internal
    > spool control.DUL
    > select * from v$dbfile;
    > spool off
 
    Oracle 8
    --------
    > connect internal
    > spool control.DUL
    > select ts#, rfile#, name from v$datafile;
    > spool off
 
   Edit the spool file and change, if needed, the datafile location and stripe
   out unnecessary information like table headers, feedback line, etc...
   A sample control file looks something like this :
 
    REM Oracle7 control file
    1 D:\DUL\DATAFILE\SYS1ORCL.DBF
    3 D:\DUL\DATAFILE\DAT1ORCL.DBF
    7 D:\DUL\DATAFILE\USR1ORCL.DBF
 
    REM Oracle8 control file
    0 1 D:\DUL\DATAFILE\SYS1ORCL.DBF
    1 2 D:\DUL\DATAFILE\USR1ORCL.DBF
    1 3 D:\DUL\DATAFILE\USR2ORCL.DBF
    2 4 D:\DUL\DATAFILE\DAT1ORCL.DBF
 
  Note : Each entry can contain a part of a datafile, this can be useful when
         you need to split datafiles that are too big for DUL, so that each
         part is smaller than for example 2GB. For example :
 
         REM Oracle8 with a datafile split into multiple parts, each part is
         REM smaller than 1GB !
         0 1 D:\DUL\DATAFILE\SYS1ORCL.DBF
         1 2 D:\DUL\DATAFILE\USR1ORCL.DBF startblock 1 endblock 1000000
         1 2 D:\DUL\DATAFILE\USR1ORCL.DBF startblock 1000001 endblock 2000000
         1 2 D:\DUL\DATAFILE\USR1ORCL.DBF startblock 2000001 endblock 2550000
 
 2.3 Unload the object information
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
   Start the DUL utility with the appropriate ddl (Dul Description Language)
   script. There are 3 scripts available to unload the USER$, OBJ$, TAB$ and
   COL$ tables according to the database version.
 
   Oracle6 :> dul8.exe dictv6.ddl
   Oracle7 :> dul8.exe dictv7.ddl
   Oracle8 :> dul8.exe dictv8.ddl
 
   Data UnLoader: Release 8.0.5.3.0 - Internal Use Only - on Tue Jun 22 22:19:
   Copyright (c) 1994/1999 Bernard van Duijnen All rights reserved.
 
   Parameter altered
   Session altered.
   Parameter altered
   Session altered.
   Parameter altered
   Session altered.
   Parameter altered
   Session altered.
   . unloading table                      OBJ$    2271 rows unloaded
   . unloading table                      TAB$     245 rows unloaded
   . unloading table                      COL$   10489 rows unloaded
   . unloading table                     USER$      22 rows unloaded
   . unloading table                  TABPART$       0 rows unloaded
   . unloading table                      IND$     274 rows unloaded
   . unloading table                     ICOL$     514 rows unloaded
   . unloading table                      LOB$      13 rows unloaded
 
   Life is DUL without it
 
   This will unload the data of the USER$, OBJ$, TAB$ and COl$ data dictionary
   tables into SQL*Loader files , this can not be manipulated into dump files
   of the import format. The parameter export_mode = false is hardcoded into
   the ddl scripts and can not be changed to the value "true" since this will
   cause DUL to fail with the error:
 
   . unloading table                      OBJ$
   DUL: Error: Column "DATAOBJ#" actual size(2) greater than length in column
definition(1)
   .............etc...............
 
 2.4 Invoke DUL
 ~~~~~~~~~~~~~~
 
   Start DUL in interactive mode or you can prepare a scripts that contains all
   the ddl commands to unload the necessary data from the database. I will
   describe in this document the most used commands, this is not a complete list
   of possible parameters that can be specified. A complete list can be found at
   http://www.nl.oracle.com/support/DUL/ucg8.html section "DDL Description".
 
   DUL> unload database;
     => this will unload the entire database tables(includes sys'tables as well)
 
   DUL> unload user <username>;
     => this will unload all the tables owned by that particullarly user.
 
   DUL> unload table <username.table_name>;
     => this will unload the specified table owned by that username
 
   DUL> describe <owner_name.table_name>;
     => will represent the table columns with there relative pointers to the
        datafile(s) owned by the specified user.
 
   DUL> scan database;
     => Scans all blocks of all data files.
         Two files are generated:
        1: seg.dat information of found segment headers (index/cluster/table)
              (object id, file number, and block number).
         2: ext.dat information of contiguous table/cluster data blocks.
              (object id(V7), file and block number of segment header (V6),
              file number and block number of first block,
              number of blocks, number of tables)
 
   DUL> scan tables;
     => Uses seg.dat and ext.dat as input.
        Scans all tables in all data segments (a header block and at least one
        matching extent with at least 1 table).
 
 2.5 Rebuild the database
 ~~~~~~~~~~~~~~~~~~~~~~~~
 
 Create the new database and use import or SQL*Loader to restore the data
 retrieved by DUL. Note that when you only unloaded the data that table
 structures, indexation, grants, PL/SQL and triggers will no longer exist in
 the new database. To obtain an exactly same copy of the database as before
 you will need to rerun your creation scripts for the tables, indexes, PL/SQL,
 etc.
 
 If you don't have these scripts then you will need to perform the steps
 described in section 3 of this document.
 
3. How to rebuild object definitions that are stored in the data dictionary
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
You want to rebuild PL/SQL(packages, procedures, functions or triggers), grants,
indexes, constraints or storage clauses(old table structure) with DUL. This can
be done but is a little bit tricky. You need to unload the relevant data
dictionary tables using DUL and then load these tables into a healthy database,
be sure to use a different user than sys or (system). Loading the data
dictionary tables of the crashed database into the healthy database dictionary
could corrupt the healthy database as well.
 
Detailed explanation to retrieve for example pl/sql packages / procedures /
functions from a corrupted database :
 
  1) Follow the steps explained in the "Using DUL" section and unload the data
     dictionary table "source$"
 
  2) Create a new user into a healthy database and specify the desired default
     and temporary tablespace.
 
  3) Grant connect, resource, imp_full_database to the new user.
 
  4) Import/load the table "source$" into the new created schema:
 
     e.g.: imp80 userid=newuser/passw file=d:\dul\scott_emp.dmp
           log=d:\dul\impemp.txt full=y
 
  5) You can now query from the table <newuser.source$> to rebuild the pl/sql
     procedures/functions from the corrupted database. Scripts can be found on
     WebIv to generate such PL/SQL creation scripts.
 
The same steps can be followed to recreate indexes, constraints, and storage
parameters or to regrant privileges to the appropiate users. Please notice that
you always need to use a script of some kind that can recreate the objects and
include all the features of the crashed database version. For example : when
the crashed database is of version 7.3.4 and you have several bitmap indexes,
if you would use a script that supports version 7.3.2 or prior, then you won't
be able to recreate the bitmap indexes succesful !
 
4. How to unload data when the segment header block is corrupted
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
When DUL can't retrieve data block information on the normal way, it can scan
the database to create its own segment/extent map. The procedure of scanning
the database is necessary to unload the data from the datafiles.
(to illustrate this example I copied an empty block ontop of the segment header
block)
 
 1) Create an appropiate "init.dul" (see 2.1) and "control.dul" (see 2.2) file.
 
 2) Unload the table. This will fail and indicate that there is a corruption in
    the segment header block:
 
    DUL> unload table scott.emp;
    . unloading table                       EMP
    DUL: Warning: Block is never used, block type is zero
    DUL: Error: While checking tablespace 6 file 10 block 2
    DUL: Error: While processing block ts#=6, file#=10, block#=2
    DUL: Error: Could not read/parse segment header
        0 rows unloaded
 
 3) run the scan database command :
 
    DUL> scan database;
     tablespace 0, data file 1: 10239 blocks scanned
     tablespace 6, data file 10: 2559 blocks scanned
 
 4) Indicate to DUL that it should use its own generated extent map rather than
    the segment header information.
 
    DUL> alter session set use_scanned_extent_map = true;
    Parameter altered
    Session altered.
    DUL> unload table scott.emp;
    . unloading table                  EMP       14 rows unloaded
 
5. How to unload data when the datafile header block is corrupted
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
A corruption in the datafile header block is always listed at the moment you
open the database this is not like a header segment block corruption (see point
4) where the database can be succesfully openend and the corruption is listed
at the moment you do a query of a table. Dul has no problems with recovering
from such situations although there are other alternatives of recovering from
this situation like patching the datafile header block.
 
The error you will receive looks something like :
  ORACLE instance started.
  Total System Global Area                         11739136 bytes
  Fixed Size                                          49152 bytes
  Variable Size                                     7421952 bytes
  Database Buffers                                  4194304 bytes
  Redo Buffers                                        73728 bytes
  Database mounted.
  ORA-01122: database file 10 failed verification check
  ORA-01110: data file 10: 'D:\DATA\TRGT\DATAFILES\JUR1TRGT.DBF'
  ORA-01251: Unknown File Header Version read for file number 10
 
6. How to unload data without the system tablespace
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
If datafiles are not available for the system tablespace the unload can still
continue but the object information can't be retrieved from the data dictionary
tables USER$, OBJ$, TAB$ and COL$. So ownername, tablename and columnnames will
not be loaded into the DUL dictionary. Identifying the tables can be an
overwhelming task and a good knowledge of the RDBMS internals are needed here.
First of all you need a good knowledge of your application and it's tables.
Column types can be guessed by DUL, but table and column names will be lost.
 
Any old system tablespace from the same database (may be weeks old) can be a
great help !
 
1) Create the "init.dul" file and the "control.dul" file as explained in above
   steps 1 and 2. In this case the control file will contain all the datafiles
   from which you want to restore but it doesn't require the system tablespace
   information.
 
2) Then You invoke dul and type the following command :
 
   DUL> scan database;
   data file 6 1280 blocks scanned
 
   This will build the extent and segment map. Probably the dul command
   interpreter will be terminated as well.
 
3) reinvoke the dul command interpreter and do the following :
 
     Data UnLoader: Release 8.0.5.3.0 - Internal Use Only - on Tue Aug 03 13:33:
 
     Copyright (c) 1994/1999 Oracle Corporation, The Netherlands. All rights res
     Loaded 4 segments
     Loaded 2 extents
     Extent map sorted
     DUL> alter session set use_scanned_extent_map = true;
     DUL> scan tables; (or scan extents;)
 
     Scanning tables with segment header
 
     Oid 1078 fno 6 bno 2 table number 0
 
     UNLOAD TABLE T_O1078 ( C1 NUMBER, C2 UNKNOWN, C3 UNKNOWN )
       STORAGE ( TABNO 0 EXTENTS( FILE 6 BLOCK 2));
     Colno  Seen MaxIntSz Null% C75% C100 Num% NiNu% Dat% Rid%
         1     4        2    0%   0%   0% 100% 100%   0%   0%
         2     4       10    0% 100% 100% 100%   0%   0%   0%
         3     4        8    0% 100% 100% 100%   0%   0%  50%
     "10" "ACCOUNTING" "NEW YORK"
     "20" "RESEARCH" "DALLAS"
     "30" "SALES" "CHICAGO"
     "40" "OPERATIONS" "BOSTON"
 
     Oid 1080 fno 6 bno 12 table number 0
 
     UNLOAD TABLE T_O1080 ( C1 NUMBER, C2 UNKNOWN, C3 UNKNOWN, C4 NUMBER,
         C5 DATE, C6 NUMBER, C7 NUMBER, C8 NUMBER )
       STORAGE ( TABNO 0 EXTENTS( FILE 6 BLOCK 12));
     Colno  Seen MaxIntSz Null% C75% C100 Num% NiNu% Dat% Rid%
         1    14        3    0%   0%   0% 100% 100%   0%   0%
         2    14        6    0% 100% 100% 100%   0%   0%  21%
         3    14        9    0% 100% 100% 100%   0%   0%   0%
         4    14        3    7%   0%   0% 100% 100%   0%   0%
         5    14        7    0%   0%   0%   0%   0% 100%   0%
         6    14        3    0%   0%   0% 100% 100%   0%   0%
         7    14        2   71%   0%   0% 100% 100%   0%   0%
         8    14        2    0%   0%   0% 100% 100%   0%   0%
     "7369" "SMITH" "CLERK" "7902" "17-DEC-1980 AD 00:00:00" "800" "" "20"
     "7499" "ALLEN" "SALESMAN" "7698" "20-FEB-1981 AD 00:00:00" "1600" "300" "30"
     "7521" "WARD" "SALESMAN" "7698" "22-FEB-1981 AD 00:00:00" "1250" "500" "30"
     "7566" "JONES" "MANAGER" "7839" "02-APR-1981 AD 00:00:00" "2975" "" "20"
     "7654" "MARTIN" "SALESMAN" "7698" "28-SEP-1981 AD 00:00:00" "1250" "1400" "30"
 
   Note : it might be best that you redirect the output to a logfile since
          commands like the "scan tables" can produce a lot of output.
          On Windows NT you can do the following command :
          C:\> dul8 > c:\temp\scan_tables.txt
           scan tables;
           exit;
 
4) Identify the lost tables from the output of step 3; if you look carefully to
   the output above then you will notice that the unload syntax is already given
   but that the table name will be of the format t_0<objectno> and the column
   names will be of the format C<no>; datatypes will not be an exact match of
   the datatype as it was before.
 
   Look especially for strings like "Oid 1078 fno 6 bno 2 table number 0" where:
   oid = object id, will be used to unload the object
   fno = (data)file number
   bno = block number
 
5) Unload the identified tables with the "unload table" command :
 
     DUL> unload table dept (deptno number(2), dname varchar2(14),
            loc varchar2(13)) storage (OBJNO 1078)
     Unloading extent(s) of table DEPT 4 rows

Oracle DUL/AUL/ODU 工具说明的更多相关文章

  1. Oracle RAC 常用维护工具和命令

    Oracle RAC 常用维护工具和命令 分类: Oracle Basic Knowledge Oracle RAC2010-03-09 01:02 13987人阅读 评论(6) 收藏 举报 orac ...

  2. Oracle EBS使用adpatch工具打patch过程【Z】

    Oracle EBS使用adpatch工具打patch过程 从Metalink下载补丁 登陆到Metalink(https://support.oracle.com),Oracle内部用户可以使用AR ...

  3. 数据库--oracle图形化管理工具和新增自定义用户

    oracle数据库图形化管理工具: 1 navicat工具很小,操作mySQL和SQLServer非常好用,但对于oracle体验性就有点差,要自己下载编码和替换oci文件.下面是解决的方法教程链接 ...

  4. Oracle GI 日志收集工具 - TFA

    1.TFA的目的: TFA是个11.2版本上推出的用来收集Grid Infrastructure/RAC环境下的诊断日志的工具,它可以用非常简单的命令协助用户收集RAC里的日志,以便进一步进行诊断:T ...

  5. 很多人都没用过的轻量级Oracle数据库数据导出工具SQLLDR2——性能超赞

    SQLLDR2 介绍 每周发表一篇数据库或大数据相关的帖子,敬请关注 1. 工具介绍 Sqluldr2(SQL * UnLoader 第二版)是灵活与强大的 Oracle 文本导出程序,已被大众使 用 ...

  6. oracle wrapped 代码解密工具 unwraper

    Oracle中的Wrap 功能是为了不让别人看到函数/存储过程的SQL源码的明文, 作为技术宅,有的时候想看源码但是看不到的那种心情是可以理解的, 发一个简单易用的 Oracle wrapped 解码 ...

  7. 使用oracle的大数据工具ODCH访问HDFS数据文件

    软件下载 Oracle Big Data Connectors:ODCH 下载地址: http://www.oracle.com/technetwork/bdc/big-data-connectors ...

  8. oracle存储过程代码覆盖率统计工具

    目前针对于高级语言如C++,JAVA,C#等工程都有相关的代码覆盖率统计工具,但是对于oracle存储过程或者数据库sql等方面的项目,代码覆盖率统计和扫描工具相对较少. 因此针对这种情况,设计了代码 ...

  9. Oracle 补丁及opatch 工具介绍

    一. CPU(Critical Patch Update) 一个CPU内包含了对多个安全漏洞的修复,并且也包括相应必需的非安全漏洞的补丁.CPU是累积型的,只要安装最新发布的CPU即可,其中包括之前发 ...

随机推荐

  1. Java之集合(四)Vector和Stack

    转载请注明源出处:http://www.cnblogs.com/lighten/p/7296023.html 1.前言 本章介绍Java集合List中的Vector和其子类Stack.Vector类是 ...

  2. 第12章—使用NoSQL数据库—使用MongoDB+Jpa操作数据库

    使用MongoDB+Jpa操作数据库 SpringData还提供了对多种NoSQL数据库的支持,包括MongoDB;neo4j和redis.他不仅支持自动化的repository,还支持基于模板的数据 ...

  3. Postman—做各种类型的http接口测试

    首先,做接口测试前要有明确的接口文档,假设已经在PC上安装好了Postman. 1. 普通的以key-value传参的get请求 e.g. 获取用户信息 Get请求,写入url拼好参数,发送请求,查看 ...

  4. SPSS学习系列之SPSS Modeler Server是什么?

    不多说,直接上干货! SPSS Modeler 使用客户端/服务器体系结构将资源集约型操作的请求分发给功能强大的服务器软件,因而使大数据集的传输速度大大加快.除了此处所列的产品和更新,也可能还有其他可 ...

  5. ugui使用自带功能实现反向遮罩

    不需要编写额外的shader和任何代码,只使用自带的功能 新建一个材质球,取名为mask,选择自带的UI/Default,调节参数如下图 再新建一个材质球,取名为masked,调节参数如下图 如下图所 ...

  6. java学习-MD5消息摘要算法

    md5 属于hash算法一类,是不可逆的消息摘要算法.与对称加密和非对称加密算法不一样,不需要加密密钥. 注意: md5不是加密算法,只是将数据进行散列计算后生成一个唯一值的算法,没有加密密钥也没有解 ...

  7. android学习-Adapter适配器进阶

    参考资源 Android 快速开发系列 打造万能的ListView GridView 适配器 实现代码复用,争取打机**的时间. android4.4源码 target=android-19 一般自定 ...

  8. 4-nginx-反向代理到tomcat及负载均衡

    反向代理相比于正向代理, 比如使用搬瓦工时, 就是位于客户端的正想代理, 而反向代理则是服务器端的代理, 主要用于实现请求分发, 负载均衡等功能 正向代理推荐一个: 搬瓦工, 比较好用.. 反向代理主 ...

  9. Mac 硬盘中各个文件夹详解

    打开Macintosh HD你会发现内中有四个文件夹(一般情况下,隐藏文件夹是不可见的,而且,可能会更多,比如安装xcode后会有developer文件夹). 分别有——应用程序(Applicatio ...

  10. 从raft论文出发

    介绍 Raft是一种为了管理复制日志的一致性算法.为了提升可理解性,Raft 将一致性算法分解成了几个关键模块,例如领导人选举.日志复制和安全性.同时它通过实施一个更强的一致性来减少需要考虑的状态的数 ...