mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
wal: add more explanation to wal filename format
This commit is contained in:
parent
04abd5603f
commit
413b6a59ff
@ -31,11 +31,16 @@ When a user has finished using a WAL it must be closed:
|
||||
WAL files are placed inside of the directory in the following format:
|
||||
$seq-$index.wal
|
||||
|
||||
The first WAL file to be created will be 0000000000000000-0000000000000000.wal
|
||||
indicating an initial sequence of 0 and an initial raft index of 0.
|
||||
|
||||
Periodically a user will want to "cut" the WAL and place new entries into a new
|
||||
file. This will increment an internal sequence number and cause a new file to
|
||||
be created. If the last raft index saved was 0x20 and this is the first time
|
||||
Cut has been called on this WAL then the sequence will increment from 0x0 to
|
||||
0x1. The new file will be: 0000000000000001-0000000000000020.wal
|
||||
0x1. The new file will be: 0000000000000001-0000000000000020.wal. If a second
|
||||
Cut is issues 0x10 entries later then the file will be called:
|
||||
0000000000000002-0000000000000030.wal.
|
||||
|
||||
At a later time a WAL can be opened at a particular raft index:
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user