132 lines
2.3 KiB
Plaintext
132 lines
2.3 KiB
Plaintext
namespace wal;
|
|
|
|
table Entry {
|
|
entry_type: EntryType;
|
|
}
|
|
|
|
table EntryType {
|
|
write: Write;
|
|
delete: Delete;
|
|
}
|
|
|
|
table Write {
|
|
points: [Point];
|
|
}
|
|
|
|
table I64Value {
|
|
value: int64;
|
|
}
|
|
|
|
table U64Value {
|
|
value: uint64;
|
|
}
|
|
|
|
table F64Value {
|
|
value: float64;
|
|
}
|
|
|
|
table BoolValue {
|
|
value: bool;
|
|
}
|
|
|
|
table StringValue {
|
|
value: string;
|
|
}
|
|
|
|
union PointValue {
|
|
I64Value,
|
|
U64Value,
|
|
F64Value,
|
|
BoolValue,
|
|
StringValue
|
|
}
|
|
|
|
table Point {
|
|
key: string;
|
|
time: int64;
|
|
value: PointValue;
|
|
}
|
|
|
|
table Delete {
|
|
predicate: string;
|
|
start_time: int64;
|
|
stop_time: int64;
|
|
}
|
|
|
|
// Segment is a collection of ReplicatedWrites. It is the payload of a WAL
|
|
// segment file.
|
|
table Segment {
|
|
number: uint64;
|
|
writer_id: uint32;
|
|
writes: [ReplicatedWrite];
|
|
writers: [WriterSummary];
|
|
}
|
|
|
|
// WriterSummary contains the inormation for a writer that has writes in a Segment
|
|
table WriterSummary {
|
|
writer_id: uint32;
|
|
start_sequence: uint64;
|
|
end_sequence: uint64;
|
|
// if true, there are sequence numbers between start and end that were missing
|
|
missing_sequences: bool;
|
|
}
|
|
|
|
// ReplicatedWrite is what gets sent between InfluxDB IOx servers and potentially
|
|
// persisted up to object storage from the servers that receive it. The combination
|
|
// of the writer, timestamp and checksum in this table can be used to deduplicate
|
|
// replicated writes from other hosts.
|
|
table ReplicatedWrite {
|
|
// writer is a unique identifier for the router that received this write
|
|
writer: uint32;
|
|
// sequence is number this write comes in. This resets on restart of the writer
|
|
sequence: uint64;
|
|
// checksum is a crc32 checksum of the payload
|
|
checksum: uint32;
|
|
// payload is the raw bytes of a WriteBufferBatch
|
|
payload: [ubyte];
|
|
}
|
|
|
|
table WriteBufferBatch {
|
|
entries: [WriteBufferEntry];
|
|
}
|
|
|
|
table WriteBufferEntry {
|
|
partition_key: string;
|
|
table_batches: [TableWriteBatch];
|
|
delete: WriteBufferDelete;
|
|
}
|
|
|
|
enum ColumnType : byte { I64, U64, F64, Tag, String, Bool }
|
|
|
|
table TableWriteBatch {
|
|
name: string;
|
|
rows: [Row];
|
|
}
|
|
|
|
table Row {
|
|
values: [Value];
|
|
}
|
|
|
|
table TagValue {
|
|
value: string;
|
|
}
|
|
|
|
union ColumnValue {
|
|
TagValue,
|
|
I64Value,
|
|
U64Value,
|
|
F64Value,
|
|
BoolValue,
|
|
StringValue
|
|
}
|
|
|
|
table Value {
|
|
column: string;
|
|
value: ColumnValue;
|
|
}
|
|
|
|
table WriteBufferDelete {
|
|
table_name: string;
|
|
predicate: string;
|
|
}
|