-
Notifications
You must be signed in to change notification settings - Fork 44
[proto] declare ReportEvent snapshot schema #235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,49 +46,73 @@ enum StorageType { | |
| ST_VINEYARD = 7; | ||
| } | ||
|
|
||
| // ---- V6D event reporting ---- | ||
| // ---- Cache event reporting ---- | ||
| // | ||
| // ReportEvent is the ingestion API used by cache subscribers. A subscriber | ||
| // normalizes engine-specific cache signals (for example RTP-LLM full cache | ||
| // snapshots or vLLM KV events) into block-level mutations on one storage | ||
| // system. `storage_type` names that large storage/cache system; `medium` | ||
| // identifies one diffable cache namespace under the reporter host; LocationSpec | ||
| // describes where each cache component of the block lives. KVCM currently | ||
| // matches only full-attention specs and ignores mamba-state specs by | ||
| // LocationSpec.name. | ||
|
|
||
| enum ReportEventType { | ||
| EVENT_UNSPECIFIED = 0; | ||
| EVENT_NODE_REGISTER = 1; // V6D node starts up and registers with KVCM | ||
| EVENT_BLOCK_ADD = 2; // V6D stored a new block locally | ||
| EVENT_BLOCK_DELETE = 3; // V6D deleted a block locally | ||
| EVENT_HOST_DOWN = 4; // V6D node is going down (graceful or detected) | ||
| EVENT_HEARTBEAT = 5; // V6D periodic heartbeat | ||
| EVENT_NODE_REGISTER = 1; // Reporter node starts up and registers with KVCM | ||
| EVENT_BLOCK_ADD = 2; // Reporter stored a block in one location | ||
| EVENT_BLOCK_DELETE = 3; // Reporter removed a block from one location | ||
| EVENT_HOST_DOWN = 4; // Reporter node is going down (graceful or detected) | ||
| EVENT_HEARTBEAT = 5; // Reporter periodic heartbeat | ||
| EVENT_BLOCK_SNAPSHOT = 6; // Reporter sends the full block set for one host/medium | ||
| } | ||
|
|
||
| message NodeRegisterParams { | ||
| message NodeRegisterEventParams { | ||
| repeated string mediums = 1; // mediums supported by the node, e.g. ["mem","disk"] | ||
| } | ||
|
|
||
| message BlockAddParams { | ||
| message BlockAddEventParams { | ||
| string block_key = 1; // int64 as string | ||
| string uri = 2; // deprecated, use specs instead | ||
| string medium = 3; // e.g. "mem"/"disk"/"ssd"/"hbm" | ||
| string medium = 3; // cache tier/namespace, e.g. "mem", "disk", "gpu", "hbm" | ||
| repeated LocationSpec specs = 4; | ||
| } | ||
|
|
||
| message BlockDeleteParams { | ||
| message BlockDeleteEventParams { | ||
| string block_key = 1; | ||
| string medium = 2; | ||
| string medium = 2; // cache tier/namespace, e.g. "mem", "disk", "gpu", "hbm" | ||
| // Optional. When set, KVCM applies the delete only if these component names | ||
| // contain a full-attention spec; mamba-state-only deletes are ignored. | ||
| repeated string spec_names = 3; | ||
|
Comment on lines
+84
to
+86
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When a reporter sends Useful? React with 👍 / 👎. |
||
| } | ||
|
|
||
| message HostDownParams { | ||
| message BlockSnapshotItem { | ||
| string block_key = 1; | ||
| repeated LocationSpec specs = 2; | ||
| } | ||
|
|
||
| message BlockSnapshotEventParams { | ||
| string medium = 1; // cache tier/namespace, e.g. "mem", "disk", "gpu", "hbm" | ||
| repeated BlockSnapshotItem blocks = 2; | ||
| } | ||
|
|
||
| message HostDownEventParams { | ||
| } | ||
|
|
||
| message HeartbeatParams { | ||
| message HeartbeatEventParams { | ||
| // KVCM only refreshes last_heartbeat; system_status is opaque observability data | ||
| map<string, string> system_status = 1; | ||
| } | ||
|
|
||
| message EventItem { | ||
| ReportEventType event_type = 1; | ||
| oneof event_params { | ||
| NodeRegisterParams node_register = 2; | ||
| BlockAddParams block_add = 3; | ||
| BlockDeleteParams block_delete = 4; | ||
| HostDownParams host_down = 5; | ||
| HeartbeatParams heartbeat = 6; | ||
| NodeRegisterEventParams node_register = 2; | ||
| BlockAddEventParams block_add = 3; | ||
| BlockDeleteEventParams block_delete = 4; | ||
| HostDownEventParams host_down = 5; | ||
| HeartbeatEventParams heartbeat = 6; | ||
| BlockSnapshotEventParams block_snapshot = 7; | ||
| } | ||
| } | ||
|
|
||
|
|
@@ -97,7 +121,7 @@ message ReportEventRequest { | |
| string instance_id = 2; | ||
| string host_ip_port = 3; | ||
| repeated EventItem events = 4; | ||
| StorageType storage_type = 5; // required: declares the reporter's storage type | ||
| StorageType storage_type = 5; // required: declares the reporter's storage/cache system | ||
| } | ||
|
|
||
| message ReportEventResponse { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renaming the existing protobuf messages changes the generated API surface even though the field numbers and oneof accessors stay wire-compatible. Downstream ReportEvent producers that construct or annotate
NodeRegisterParams,BlockAddParams, etc. from the current schema will fail to compile/import after regenerating stubs because those public types have been replaced by*EventParams; keeping the old message names while adding the snapshot types avoids a source-breaking schema-only change.Useful? React with 👍 / 👎.