Thales Macedo Garitezi
6d37d2df68
fix(ets_model): use only ChanPid as key to save memory
2021-11-08 12:15:04 -03:00
Thales Macedo Garitezi
0955122468
fix(live_conn): fix double-decrement for anonymous clients
...
`set_chan_info` does contain the `conn_state`, but it seems that it is
not called for anonymous clients disconnecting.
`emqx_channel:handle_info({sock_closed, normal}, _, _)` is called with
`conn_state := connected` (which decrements by calling
`emqx_channel:ensure_disconnected` and does not call `set_chan_info`),
and afterwards `emqx_cm` receives a `DOWN` message from the same chan.
When the `DOWN` message is received, we check `?CHAN_INFO_TAB` for
that key and check if the persisted state is `connected`. Only in that
case we decrement during `DOWN` messages.
Testing manually, it is still being persisted as `connected`, hence
the double-decrease.
We attempt to solve this by using the ETS as a set with `{ClientID,
ChanPid}` as the key to resolve duplication.
2021-11-08 11:25:55 -03:00
Thales Macedo Garitezi
8a4e0a3ecb
refactor(emqx_cm): use an ETS table instead of counters
...
It'll be much easier to mantain consistency in the counter this way
2021-11-05 18:17:31 -03:00
Thales Macedo Garitezi
dbb519ee0e
fix(tests): increase test event timeout
2021-11-05 15:16:09 -03:00
Thales Macedo Garitezi
5cbdfa61b8
feat(emqx_cm): add check to see if count is ever negative
2021-11-05 14:04:20 -03:00
Thales Macedo Garitezi
1fa7e70081
chore(emqx_cm): rm periodic count refresh after review
...
This will be done in another PR, if needed.
2021-11-05 14:04:04 -03:00
Thales Macedo Garitezi
eb5e1a5cb9
refactor(emqx_cm): use `counters` in place of internal state
2021-11-05 14:03:50 -03:00
Thales Macedo Garitezi
9af60ac126
fix(test): rm unused test var warning
2021-11-05 14:03:33 -03:00
Thales Macedo Garitezi
29be556e9a
refactor(review): apply code improvements
2021-11-05 14:03:07 -03:00
Thales Macedo Garitezi
c5869b62dc
test(ws): add websocket tests
2021-11-04 11:42:25 -03:00
Thales Macedo Garitezi
8f853982a6
feat(stats): add `live_connections.{count,max}` stats to `emqx_stats`
2021-11-04 09:26:51 -03:00
Thales Macedo Garitezi
2d29ba8550
feat(stats): periodic reconciliation of connected client count
2021-11-04 08:40:16 -03:00
Thales Macedo Garitezi
28e23523a5
feat(stats): track connected client count for monitoring
...
In order to correctly display the number of connected clients in our
monitor dashboard, we need to track those connections that are
actually connected to clients, not considering connections from
persistent sessions that are disconnected. Today, the
`connections.count` that is displayed in the dashboards considers
those disconnected persistent sessions as well.
2021-11-04 08:38:21 -03:00
lafirest
4b2586fec4
Merge pull request #6048 from lafirest/feat/slow_topics
...
feat: add slow topics statistics plugin
2021-11-03 17:50:07 +08:00
lafirest
f8acb31f89
feat: add slow topics statistics plugin
2021-11-03 17:20:07 +08:00
Zaiming Shi
aa90177302
Merge remote-tracking branch 'origin/main-v4.3' into main-v4.4
2021-11-03 08:28:14 +01:00
Zaiming (Stone) Shi
818bde1820
Merge pull request #6044 from zmstone/use-profile-name-as-default-docker-image-tag
...
Use profile name as default docker image tag
2021-11-03 06:21:34 +01:00
Zaiming Shi
2fb8ffa8c2
test: add git credentials for enterprise tests
2021-11-02 23:12:30 +01:00
Zaiming Shi
c6c9ba400e
test: parameterise emqx image name in automated integration tests
2021-11-02 22:54:52 +01:00
Zaiming Shi
42695a2f9a
chore: remove external contributors as maintainers
...
Big thank you to Raymond M Mouthaan and Huang Rui
2021-11-02 18:25:25 +01:00
Zaiming Shi
1d0c8a4eef
fix: use of default profile name as default docker image name
2021-11-02 18:25:25 +01:00
Turtle
f00e254bdf
chore(release): update version to 4.3.9
2021-11-02 18:26:57 +08:00
zhouzb
3d9054d25e
fix(typo): fix typo in webhook resource
2021-11-02 13:28:46 +08:00
Shawn
0ab1b7c95d
fix(mongo): update mongodb to 3.0.10
2021-11-02 09:23:07 +08:00
Zaiming (Stone) Shi
2a3d1fcb78
Merge pull request #6023 from xiangfangyang-tech/main-v4.3
...
chore(autotest): add mysql&pgsql&http test flow in git_action flow
2021-11-01 16:24:20 +01:00
Zaiming (Stone) Shi
fa92e61440
Merge pull request #6031 from HJianBo/ignore-duplicated-sock-error
...
Ignore log duplicated sock error
2021-11-01 14:36:14 +01:00
JianBo He
763f567f7d
chore(appup): update appup.src
2021-11-01 18:35:41 +08:00
JianBo He
c9d39b4d35
chore(channel): remove redundant logs
...
Multiple sock_closed events may be generated,
so we need to allow sock_closed events to be reentrant
2021-11-01 18:17:38 +08:00
Zaiming (Stone) Shi
8526032200
Merge pull request #6012 from Rory-Z/chore/change-ci-helper-version
...
ci: change emqx-ci-helper version for build workflows
2021-11-01 10:18:49 +01:00
xiangfangyang-tech
d28f913b94
chore(autotest): update redis ssl cert file
2021-11-01 16:34:37 +08:00
Zaiming (Stone) Shi
3175d59e7b
Merge pull request #6033 from zmstone/fix-find-missing-dyn-lib-before-boot
...
best-effort portable for zip packages
2021-11-01 08:08:26 +01:00
Zaiming Shi
9832a2ed00
build: show linux distro in BUILT_ON info
2021-10-31 17:21:47 +01:00
Zaiming Shi
ecb6c1c59e
build: copy dynamic libs for zip package
2021-10-31 17:21:26 +01:00
Zaiming (Stone) Shi
831f2eda0c
Merge pull request #6030 from zmstone/fix-force-kill-after-kick-or-discard-timeout
...
fix(session): force kill session for 'kick' and 'discard'
2021-10-31 09:48:04 +01:00
Zaiming Shi
fb62487801
fix(emqx/appup): add emqx_cm to appup
2021-10-30 16:39:04 +02:00
Zaiming Shi
765a76fa80
fix(emqx_mgmt_cli): idempontent kick. now it always returns ok
2021-10-30 16:38:36 +02:00
Zaiming Shi
7f4809f61a
fix(session): force kill session for 'kick' and 'discard'
...
Prior to this fix, 'kick' and 'discard' calls may timeout (or
fail for other reason), failures lead to only a log, then
continue to allow the new session to get registered.
As a result, in case a client is stuck, there is no way to
force it to step down, end up with multiple connections (sessions)
for the client ID in dashboard.
After this fix, the stale pids are notified to shutdown
via a gen_server:call, and forced with a exit(Pid, kill) for any
exception happend to the gen_server:call
2021-10-30 16:38:36 +02:00
k32
cfe3efed4a
Merge pull request #6024 from k32/4-4-fix-gen-rpc
...
fix(emqx_broker): Preserve message order across the cluster
2021-10-29 12:49:25 +02:00
k32
791caba2ed
fix(broker): Fix out-of-order message delivery in a cluster
...
Fixes : #4658
2021-10-29 10:47:56 +02:00
xiangfangyang-tech
2ce592040e
Merge branch 'main-v4.3' into main-v4.3
2021-10-29 15:12:22 +08:00
xiangfangyang-tech
afd6fe181c
chore(autotest): add git action script for v4.3
...
chore(autotest): change git site of autemate script
chore(autotest): improve git action script with Stones advises
chore(autotest): improve trigger condition
chore(autotest): add mysql&pgsql&http test flow in git_action script
2021-10-29 15:00:42 +08:00
Zaiming (Stone) Shi
b50f0b67d4
Merge pull request #6021 from zmstone/fix-boot-handle-vmarg-flags
...
fix: boot handle vmarg flags
2021-10-29 08:32:43 +02:00
Zaiming Shi
cb3d2fd6c3
chore: refine -heart option document
2021-10-28 21:15:54 +02:00
Zaiming Shi
18fc82855b
fix(bin/emqx): handle flags in vm.args
...
prior to this fix, the flags such as -heart in vm.args file were taken
as KEY="", VALUE="-heart"
as a result, the sed replacement replaces all lines with "-heart"
causing beam to crash at boot
2021-10-28 21:09:06 +02:00
Zaiming (Stone) Shi
dd4e307753
Merge pull request #5995 from Spycsh/main-v4.3
...
chore: add cluster script for local machine
2021-10-28 14:20:07 +02:00
Spycsh
ec30fb346a
chore: add cluster script for local machine
2021-10-28 12:07:23 +08:00
zhanghongtong
ba3e7841e5
ci: change emqx-ci-helper version for build workflows
2021-10-27 17:21:17 +08:00
Ilya Averyanov
49c7eae211
Merge pull request #5885 from savonarola/fix-acl-schema
...
fix(mnesia_acl): introduce optimized schema and migration process
2021-10-27 10:41:05 +03:00
Ilya Averyanov
6d48bbf34c
fix(mnesia_acl): added acl migration test scripts
2021-10-27 09:58:21 +03:00
Ilya Averyanov
ba319e1159
fix(mnesia_acl): upgrade snabbkaffe and use ?check_trace
2021-10-27 09:58:21 +03:00