[DOCS] Improve description of WAL record format (#14936)

Signed-off-by: DC <413331538@qq.com>
pull/14887/merge
DC 2024-11-26 19:48:17 +08:00 committed by GitHub
parent c3cc25f552
commit d535d501d1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 1 deletions

View File

@ -17,7 +17,15 @@ Notable deviations are that the record fragment is encoded as:
└───────────┴──────────┴────────────┴──────────────┘
```
The type flag has the following states:
The initial type byte is made up of three components: a 3-bit reserved field, a 1-bit zstd compression flag, a 1-bit snappy compression flag, and a 3-bit type flag.
```
┌─────────────────┬──────────────────┬────────────────────┬──────────────────┐
│ reserved <3bit> │ zstd_flag <1bit> │ snappy_flag <1bit> │ type_flag <3bit>
└─────────────────┴──────────────────┴────────────────────┴──────────────────┘
```
The lowest 3 bits within this flag represent the record type as follows:
* `0`: rest of page will be empty
* `1`: a full record encoded in a single fragment