From 279895b8fd9482da249db6fa95a40a3a329982f6 Mon Sep 17 00:00:00 2001 From: Ilya Averyanov Date: Mon, 28 Aug 2023 22:45:05 +0300 Subject: [PATCH] chore(ft): add read/write concurrency to emqx_ft_async_reply tabs --- apps/emqx_ft/src/emqx_ft_async_reply.erl | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/apps/emqx_ft/src/emqx_ft_async_reply.erl b/apps/emqx_ft/src/emqx_ft_async_reply.erl index f33558434..7ac4c527f 100644 --- a/apps/emqx_ft/src/emqx_ft_async_reply.erl +++ b/apps/emqx_ft/src/emqx_ft_async_reply.erl @@ -55,8 +55,15 @@ -spec create_tables() -> ok. create_tables() -> - _ = ets:new(?MON_TAB, [named_table, public, ordered_set]), - _ = ets:new(?PACKET_TAB, [named_table, public, ordered_set]), + EtsOptions = [ + named_table, + public, + ordered_set, + {read_concurrency, true}, + {write_concurrency, true} + ], + _ = ets:new(?MON_TAB, EtsOptions), + _ = ets:new(?PACKET_TAB, EtsOptions), ok. -spec register(packet_id(), mon_ref(), timer_ref()) -> ok.