From e21a3497c7dc01deada2352a31884972a5457d11 Mon Sep 17 00:00:00 2001 From: Andrew Mayorov Date: Thu, 11 Jan 2024 18:55:39 +0100 Subject: [PATCH] chore(route-sync): turn TODO into comment --- apps/emqx/src/emqx_router_syncer.erl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/emqx/src/emqx_router_syncer.erl b/apps/emqx/src/emqx_router_syncer.erl index 741e01295..ad076fc31 100644 --- a/apps/emqx/src/emqx_router_syncer.erl +++ b/apps/emqx/src/emqx_router_syncer.erl @@ -184,7 +184,12 @@ run_batch_loop(Incoming, State = #{stash := Stash0}) -> Status = #{} -> ok = send_replies(Status, Batch), NState = cancel_retry_timer(State#{stash := Stash3}), - %% TODO: postpone if only ?PRIO_BG operations left? + %% NOTE + %% We could postpone batches where only `?PRIO_BG` operations left, which + %% would allow to do less work in situations when there are intermittently + %% reconnecting clients with moderately unique subscriptions. However, this + %% would also require us to forego the idempotency of batch syncs (see + %% `merge_route_op/2`). case is_stash_empty(Stash3) of true -> NState;