From 1da024f8393cba337208661f074b34fcdd36fab0 Mon Sep 17 00:00:00 2001 From: Piotr Sikora Date: Thu, 12 Feb 2026 12:58:51 -0500 Subject: [PATCH 1/2] Add proxy_remove_shared_key. Signed-off-by: Piotr Sikora --- abi-versions/vNEXT/README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/abi-versions/vNEXT/README.md b/abi-versions/vNEXT/README.md index 59748bb..cbf187d 100644 --- a/abi-versions/vNEXT/README.md +++ b/abi-versions/vNEXT/README.md @@ -1507,6 +1507,32 @@ Returned `status` value is: point to invalid memory address. +#### `proxy_remove_shared_key` + +* params: + - `i32 (uint32_t) kvstore_id` + - `i32 (const char*) key_data` + - `i32 (size_t) key_size` + - `i32 (uint32_t) cas` +* returns: + - `i32 (`[`proxy_status_t`]`) status` + +Removes the key (`key_data`, `key_size`) from a shared key-value store +(`kvstore_id`). + +If the compare-and-swap value (`cas`) is set to a non-zero value, +then it must match the host's compare-and-swap value in order for +the update to succeed. + +Returned `status` value is: +- `OK` on success. +- `UNKNOWN_RESOURCE_ID` for unknown `kvstore_id`. +- `CAS_MISMATCH` when `cas` doesn't match host's compare-and-swap + value. +- `INVALID_MEMORY_ACCESS` when `key_data`, `key_size` and/or `cas` + point to invalid memory address. + + ## Shared Queues ### Functions exposed by the host @@ -2158,6 +2184,7 @@ changes to unrelated connections/requests. [`proxy_on_grpc_close`]: #proxy_on_grpc_close [`proxy_set_shared_data`]: #proxy_set_shared_data [`proxy_get_shared_data`]: #proxy_get_shared_data +[`proxy_remove_shared_key`]: #proxy_remove_shared_key [`proxy_register_shared_queue`]: #proxy_register_shared_queue [`proxy_resolve_shared_queue`]: #proxy_resolve_shared_queue [`proxy_enqueue_shared_queue`]: #proxy_enqueue_shared_queue From 8f297705201685ddc196270df3e859028071fc82 Mon Sep 17 00:00:00 2001 From: Piotr Sikora Date: Thu, 19 Mar 2026 11:17:37 -0400 Subject: [PATCH 2/2] review: use `set(NULL)` to delete the key. Signed-off-by: Piotr Sikora --- abi-versions/vNEXT/README.md | 30 +++--------------------------- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/abi-versions/vNEXT/README.md b/abi-versions/vNEXT/README.md index cbf187d..65fed1a 100644 --- a/abi-versions/vNEXT/README.md +++ b/abi-versions/vNEXT/README.md @@ -1470,6 +1470,9 @@ gRPC status message can be retrieved using [`proxy_get_status`]. Sets shared data identified by the key (`key_data`, `key_value`) to the value (`value_data`, `value_size`). +If the `value_data` is `0`, then the key (`key_data`, `key_size`) will be +deleted from the shared key-value store (`kvstore_id`). + If the compare-and-swap value (`cas`) is set to a non-zero value, then it must match the host's compare-and-swap value in order for the update to succeed. @@ -1507,32 +1510,6 @@ Returned `status` value is: point to invalid memory address. -#### `proxy_remove_shared_key` - -* params: - - `i32 (uint32_t) kvstore_id` - - `i32 (const char*) key_data` - - `i32 (size_t) key_size` - - `i32 (uint32_t) cas` -* returns: - - `i32 (`[`proxy_status_t`]`) status` - -Removes the key (`key_data`, `key_size`) from a shared key-value store -(`kvstore_id`). - -If the compare-and-swap value (`cas`) is set to a non-zero value, -then it must match the host's compare-and-swap value in order for -the update to succeed. - -Returned `status` value is: -- `OK` on success. -- `UNKNOWN_RESOURCE_ID` for unknown `kvstore_id`. -- `CAS_MISMATCH` when `cas` doesn't match host's compare-and-swap - value. -- `INVALID_MEMORY_ACCESS` when `key_data`, `key_size` and/or `cas` - point to invalid memory address. - - ## Shared Queues ### Functions exposed by the host @@ -2184,7 +2161,6 @@ changes to unrelated connections/requests. [`proxy_on_grpc_close`]: #proxy_on_grpc_close [`proxy_set_shared_data`]: #proxy_set_shared_data [`proxy_get_shared_data`]: #proxy_get_shared_data -[`proxy_remove_shared_key`]: #proxy_remove_shared_key [`proxy_register_shared_queue`]: #proxy_register_shared_queue [`proxy_resolve_shared_queue`]: #proxy_resolve_shared_queue [`proxy_enqueue_shared_queue`]: #proxy_enqueue_shared_queue