Просмотр исходного кода

feat(route-sync): use the smallest possible min sync delay

Andrew Mayorov 2 лет назад
Родитель
Сommit
8f4758d9d4
1 измененных файлов с 5 добавлено и 1 удалено
  1. 5 1
      apps/emqx/src/emqx_router_syncer.erl

+ 5 - 1
apps/emqx/src/emqx_router_syncer.erl

@@ -41,7 +41,11 @@
 -define(POOL, router_syncer_pool).
 
 -define(MAX_BATCH_SIZE, 1000).
--define(MIN_SYNC_INTERVAL, 1).
+
+%% How long to idle (ms) after receiving a new operation before triggering batch sync?
+%% Zero effectively just schedules out the process, so that it has a chance to receive
+%% more operations, and introduce no minimum delay.
+-define(MIN_SYNC_INTERVAL, 0).
 
 %% How long (ms) to idle after observing a batch sync error?
 %% Should help to avoid excessive retries in situations when errors are caused by