|
|
@@ -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:
|
|
|
|