Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/facade/dragonfly_connection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1574,6 +1574,12 @@ bool Connection::ProcessControlMessages(uint32_t quota) {
// PubSub replies flush immediately via FinishScope() only when batched_ is false.
// ReplyBatch() and ExecuteBatch() both reset it via absl::Cleanup guards on all return paths.
DCHECK(!reply_builder_->IsBatchMode());

// Batch control-message replies when multiple are queued,
// avoiding per-message sendmsg syscalls while preserving latency for single-message wakeups.
reply_builder_->SetBatchMode(dispatch_q_.size() > 1);
Comment thread
glevkovich marked this conversation as resolved.
absl::Cleanup batch_guard = [this] { reply_builder_->SetBatchMode(false); };

uint32_t dispatched = 0;

while (!dispatch_q_.empty()) {
Expand Down
Loading