From a28fc7bfa86a6069aa94381ea9c3319b3911900a Mon Sep 17 00:00:00 2001 From: Andrew Mayorov Date: Wed, 10 Jan 2024 20:10:34 +0100 Subject: [PATCH] feat(route-sync): do not run empty batches --- apps/emqx/src/emqx_router_syncer.erl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/emqx/src/emqx_router_syncer.erl b/apps/emqx/src/emqx_router_syncer.erl index c1928108a..a694a7134 100644 --- a/apps/emqx/src/emqx_router_syncer.erl +++ b/apps/emqx/src/emqx_router_syncer.erl @@ -221,8 +221,10 @@ replyctx_send(Result, {MRef, Pid}) -> %% -run_batch(Batch) -> - emqx_router:do_batch(Batch). +run_batch(Batch) when map_size(Batch) > 0 -> + emqx_router:do_batch(Batch); +run_batch(_Empty) -> + #{}. %%