[skip ci]Format markdown for chap08_binlog.md (#9319)

Signed-off-by: ruiyi.jiang <ruiyi.jiang@zilliz.com>
This commit is contained in:
ryjiang 2021-10-06 13:57:11 +08:00 committed by GitHub
parent e1859c059b
commit 27b95cea35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,6 @@ Binlog is stored in a columnar storage format, every column in schema is stored
Timestamp, schema, row id and primary key allocated by system are four special columns. Timestamp, schema, row id and primary key allocated by system are four special columns.
Schema column records the DDL of the collection. Schema column records the DDL of the collection.
## Event format ## Event format
Binlog file consists of 4 bytes magic number and a series of events. The first event must be descriptor event. Binlog file consists of 4 bytes magic number and a series of events. The first event must be descriptor event.
@ -29,7 +28,6 @@ Binlog file consists of 4 bytes magic number and a series of events. The first e
+=====================================+=====================================================================+ +=====================================+=====================================================================+
``` ```
### 8.2 Descriptor Event format ### 8.2 Descriptor Event format
``` ```
@ -64,7 +62,6 @@ Binlog file consists of 4 bytes magic number and a series of events. The first e
+=====================================+=====================================================================| +=====================================+=====================================================================|
``` ```
### 8.3 Type code ### 8.3 Type code
``` ```
@ -85,7 +82,6 @@ DELETE_EVENT 只能用于 primary key 的 binlog 文件(目前只有按照 pri
CREATE_COLLECTION_EVENT、DROP_COLLECTION_EVENT、CREATE_PARTITION_EVENT、DROP_PARTITION_EVENT 只出现在 DDL binlog 文件 CREATE_COLLECTION_EVENT、DROP_COLLECTION_EVENT、CREATE_PARTITION_EVENT、DROP_PARTITION_EVENT 只出现在 DDL binlog 文件
### 8.4 Event data part ### 8.4 Event data part
``` ```
@ -106,45 +102,38 @@ INSERT_EVENT:
other events are similar with INSERT_EVENT other events are similar with INSERT_EVENT
``` ```
### 8.5 Example ### 8.5 Example
Schema Schema
string | int | float(optional) | vector(512) string | int | float(optional) | vector(512)
Request: Request:
InsertRequest rows(1W) InsertRequest rows(1W)
DeleteRequest pk=1
DropPartition partitionTag="abc"
DeleteRequest pk=1
DropPartition partitionTag="abc"
insert binlogs: insert binlogs:
rowid, pk, ts, string, int, float, vector 6 files rowid, pk, ts, string, int, float, vector 6 files
all events are INSERT_EVENT all events are INSERT_EVENT
float column file contains some NULL value float column file contains some NULL value
delete binlogs: delete binlogs:
pk, ts 2 files pk, ts 2 files
pk's events are DELETE_EVENT, ts's events are INSERT_EVENT pk's events are DELETE_EVENT, ts's events are INSERT_EVENT
DDL binlogs: DDL binlogs:
ddl, ts ddl, ts
ddl's event is DROP_PARTITION_EVENT, ts's event is INSERT_EVENT
ddl's event is DROP_PARTITION_EVENT, ts's event is INSERT_EVENT
C++ interface C++ interface