mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-01 03:18:29 +08:00
[skip ci]Format markdown for chap08_binlog.md (#9319)
Signed-off-by: ruiyi.jiang <ruiyi.jiang@zilliz.com>
This commit is contained in:
parent
e1859c059b
commit
27b95cea35
@ -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.
|
||||
Schema column records the DDL of the collection.
|
||||
|
||||
|
||||
## Event format
|
||||
|
||||
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
|
||||
|
||||
```
|
||||
@ -64,7 +62,6 @@ Binlog file consists of 4 bytes magic number and a series of events. The first e
|
||||
+=====================================+=====================================================================|
|
||||
```
|
||||
|
||||
|
||||
### 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 文件
|
||||
|
||||
|
||||
### 8.4 Event data part
|
||||
|
||||
```
|
||||
@ -106,45 +102,38 @@ INSERT_EVENT:
|
||||
other events are similar with INSERT_EVENT
|
||||
```
|
||||
|
||||
|
||||
### 8.5 Example
|
||||
|
||||
Schema
|
||||
|
||||
string | int | float(optional) | vector(512)
|
||||
|
||||
|
||||
string | int | float(optional) | vector(512)
|
||||
|
||||
Request:
|
||||
|
||||
InsertRequest rows(1W)
|
||||
|
||||
DeleteRequest pk=1
|
||||
|
||||
DropPartition partitionTag="abc"
|
||||
InsertRequest rows(1W)
|
||||
|
||||
DeleteRequest pk=1
|
||||
|
||||
DropPartition partitionTag="abc"
|
||||
|
||||
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
|
||||
float column file contains some NULL value
|
||||
all events are INSERT_EVENT
|
||||
float column file contains some NULL value
|
||||
|
||||
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, ts
|
||||
|
||||
ddl's event is DROP_PARTITION_EVENT, ts's event is INSERT_EVENT
|
||||
|
||||
ddl, ts
|
||||
|
||||
ddl's event is DROP_PARTITION_EVENT, ts's event is INSERT_EVENT
|
||||
|
||||
C++ interface
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user