From 6413afd0bce3dfffd04fedb7163c8e269a4cf149 Mon Sep 17 00:00:00 2001 From: Andrew Mayorov Date: Thu, 12 Oct 2023 17:30:07 +0700 Subject: [PATCH] fix(gcpdev): restore original shard in mnesia tab definition Changing the shard is not backward compatible, and leads to a crash when upgrading from 5.2.x. --- apps/emqx_gcp_device/src/emqx_gcp_device.erl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/emqx_gcp_device/src/emqx_gcp_device.erl b/apps/emqx_gcp_device/src/emqx_gcp_device.erl index ae976ce20..381c237dd 100644 --- a/apps/emqx_gcp_device/src/emqx_gcp_device.erl +++ b/apps/emqx_gcp_device/src/emqx_gcp_device.erl @@ -8,7 +8,10 @@ -include_lib("emqx/include/logger.hrl"). -include_lib("stdlib/include/ms_transform.hrl"). --define(AUTHN_SHARD, ?MODULE). +%% NOTE +%% We share the shard with `emqx_auth_mnesia` to ensure backward compatibility +%% with EMQX 5.2.x and earlier. +-define(AUTHN_SHARD, emqx_authn_shard). %% Management -export([put_device/1, get_device/1, remove_device/1]).