From 32b4b4d24d29ee988764651d817d9ee254abdde7 Mon Sep 17 00:00:00 2001 From: Mikayla Date: Mon, 2 Oct 2023 17:10:03 -0700 Subject: [PATCH] Add message and operation ACK messages to protos --- crates/rpc/proto/zed.proto | 16 +++++++++++++++- crates/rpc/src/proto.rs | 4 +++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/crates/rpc/proto/zed.proto b/crates/rpc/proto/zed.proto index d0c9d73fc4..0f289edcf8 100644 --- a/crates/rpc/proto/zed.proto +++ b/crates/rpc/proto/zed.proto @@ -155,6 +155,7 @@ message Envelope { UpdateChannelBufferCollaborators update_channel_buffer_collaborators = 128; RejoinChannelBuffers rejoin_channel_buffers = 129; RejoinChannelBuffersResponse rejoin_channel_buffers_response = 130; + AckBufferOperation ack_buffer_operation = 143; JoinChannelChat join_channel_chat = 131; JoinChannelChatResponse join_channel_chat_response = 132; @@ -165,10 +166,11 @@ message Envelope { GetChannelMessages get_channel_messages = 137; GetChannelMessagesResponse get_channel_messages_response = 138; RemoveChannelMessage remove_channel_message = 139; + AckChannelMessage ack_channel_message = 144; LinkChannel link_channel = 140; UnlinkChannel unlink_channel = 141; - MoveChannel move_channel = 142; + MoveChannel move_channel = 142; // current max: 144 } } @@ -1062,6 +1064,11 @@ message RemoveChannelMessage { uint64 message_id = 2; } +message AckChannelMessage { + uint64 channel_id = 1; + uint64 message_id = 2; +} + message SendChannelMessageResponse { ChannelMessage message = 1; } @@ -1117,6 +1124,13 @@ message RejoinChannelBuffersResponse { repeated RejoinedChannelBuffer buffers = 1; } +message AckBufferOperation { + uint64 buffer_id = 1; + uint64 epoch = 2; + uint64 lamport_timestamp = 3; + uint64 replica_id = 4; +} + message JoinChannelBufferResponse { uint64 buffer_id = 1; uint32 replica_id = 2; diff --git a/crates/rpc/src/proto.rs b/crates/rpc/src/proto.rs index 6d0a0f85d1..f0d7937f6f 100644 --- a/crates/rpc/src/proto.rs +++ b/crates/rpc/src/proto.rs @@ -271,6 +271,8 @@ messages!( (LeaveChannelBuffer, Background), (UpdateChannelBuffer, Foreground), (UpdateChannelBufferCollaborators, Foreground), + (AckBufferOperation, Background), + (AckChannelMessage, Background), ); request_messages!( @@ -406,7 +408,7 @@ entity_messages!( ChannelMessageSent, UpdateChannelBuffer, RemoveChannelMessage, - UpdateChannelBufferCollaborators + UpdateChannelBufferCollaborators, ); const KIB: usize = 1024;