Commit Graph

739 Commits

Author SHA1 Message Date
Shawn
a63799742f fix(channel): update testcases for emqx_channel 2022-01-13 16:10:03 +08:00
Shawn
a6408cee4f fix(session): update testcases for emqx_session 2022-01-13 15:28:18 +08:00
JianBo He
cb8a3725b4 fix: disconnect the client due to exceed receive-maximum packets
As described in the 5.0 specification, we should disconnect clients that
exceed the receive-maximum limit.

> If it receives more than Receive Maximum QoS 1 and QoS 2 PUBLISH packets
where it has not sent a PUBACK or PUBCOMP in response, **the Server uses a
DISCONNECT packet with Reason Code 0x9**

fix: #6447
2021-12-23 08:48:24 +08:00
JimMoen
3ecc79e1bc test(frame): test packet proxy_protocol config disabled 2021-12-10 18:08:47 +08:00
Thales Macedo Garitezi
0260db6640
feat(sys_mon): Add proc_lib:initial_call/1 and current_stacktrace (4.3)
(Same as #6289 )

This adds the information from `proc_lib:initial_call/1` and the
current stacktrace from the process info to `emqx_sys_mon:procinfo/1`
to aid in debugging some warnings with no context such as the
following:

```
2021-11-23T12:33:59.387818+00:00 [warning] info: [{old_heap_block_size,45988046},{heap_block_size,22177879},{mbuf_size,0},{stack_size,40},{old_heap_size,22354134},{heap_size,7106339}], line: 130, mfa: emqx_sys_mon:handle_info/2, msg: large_heap, procinfo: [{pid,<0.2667.0>},{memory,579763664},{total_heap_size,68510672},{heap_size,22177879},{stack_size,40},{min_heap_size,233},{initial_call,{proc_lib,init_p,5}},{current_function,{gen,do_call,4}},{registered_name,[]},{status,running},{message_queue_len,360945},{group_leader,<0.1660.0>},{priority,normal},{trap_exit,false},{reductions,16493271},{last_calls,false},{catchlevel,4},{trace,0},{suspending,[]},{sequential_trace_token,[]},{error_handler,error_handler}]
```
2021-11-25 12:08:02 -03:00
JimMoen
289415b5aa fix(conf): change max_topic_levels default configuration 2021-11-25 09:52:12 +08:00
zhouzb
5e3fe6714e fix(http): fix duplicate http headers 2021-11-17 14:14:12 +08:00
Zaiming Shi
74b6b5214a test(emqx_cm_SUITE): add a gen_server call sync 2021-11-11 10:33:31 +01:00
zhongwencool
fa34d8353e
fix(test): flaky mqtt expiry test case. (#6112) 2021-11-10 15:40:46 +08: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
Zaiming Shi
9038da0bd2 fix(ws_connection): check origin failure should return 403 not 500 2021-10-15 15:49:26 +08:00
Zaiming Shi
7c1ce8bc70 chore: fix flaky test cm_SUITE open session racecondition 2021-10-07 11:53:53 +02:00
Zaiming Shi
3fa442f4a4 test(emqx_broker): fix flaky tests 2021-10-05 20:55:36 +02:00
JimMoen
2dba91d6d0 chore(test): variable integer test. 2021-09-28 15:15:05 +08:00
k32
5fc1036cf7 chore(mqueue): Implement live upgrade 2021-09-06 23:15:14 +02:00
k32
4eacaa29bd feat(mqueue): Interleave messages with different priorities 2021-09-06 22:22:48 +02:00
Turtle
6aa61ea78d fix(test): Increase the delay time 2021-08-13 17:29:51 +08:00
Rory Z
ff96250b0b chore(tests): fix conunt error 2021-08-06 15:31:32 +08:00
Turtle
c45de03ac8 chore(version): update emqx version to 4.3.7
Signed-off-by: zhanghongtong <rory-z@outlook.com>
2021-08-05 10:00:03 +08:00
JianBo He
07c29e8c55 chore(acl): support ipaddr list 2021-07-28 13:54:13 +08:00
Zaiming Shi
cddfa928b1 test: deterministic tests 2021-06-05 19:53:56 +02:00
Zaiming Shi
8bf3c511d8 test: fix a flacky test case 2021-06-04 16:04:58 +02:00
Tobias Lindahl
18484577b1 test: enable non-running test suite
Due to a name clash a ct testsuite was previously not running.
2021-06-03 10:42:51 +02:00
JianBo He
3a89b1f00b
chore(action): fix syntax error (#4885) 2021-05-31 15:08:52 +08:00
k32
812faf08a1 chore(logger): Update snabbkaffe to 0.13.0 2021-05-25 21:15:59 +02:00
Zaiming (Stone) Shi
37c559a08d
Merge pull request #4858 from zmstone/fix-frame-parse-split-function-clause
fix(emqx_frame): no need to split incoming bytes
2021-05-25 06:57:17 +02:00
Zaiming Shi
979e495a1e fix(emqx_frame): no need to split incoming bytes
Prior to this commit, there was a bug in emqx_frame:split/2
the tail number of bytes was used for header number of bytes
whens split. As a result, if the tail happens to be longer
then haeder, the parsing state becomes invalid and it crashes
when the next packet arrives

The split was a over-engineered micro-optimization, so it
has been deleted instead of fixed
2021-05-24 21:07:03 +02:00
Zaiming Shi
6701d716dd feat: async API to support tcp keepalive inet options 2021-05-24 19:01:13 +02:00
Zaiming Shi
8443aa5e21 chore(typo): sepecial -> special 2021-05-24 10:45:56 +02:00
Zaiming Shi
faecde9ce1 fix(emqx_plugins): allow loading conf for plugin app dir
Prior to this change, plugin config files are only allowed
to be placed in the collective config dir etc/plugins.
In order to support external plugin's drop-in deployment,
this commit made emqx_plugins module to read conf file
in application's etc dir
2021-05-24 10:45:56 +02:00
Zaiming Shi
4e1798e3f3 fix(emqx_cm): do not log noproc as error
1. websocket call exit with noproc reason.
2. do not capture stacktrace when no need for it
2021-05-19 23:16:11 +02:00
Zaiming Shi
55316b3ac3 perf: micro optimisation: no lookup for non-wildcard in trie 2021-05-14 10:45:58 +02:00
Zaiming Shi
3c03047c9f fix(emqx_trie): performance issue when many levels 2021-05-14 10:45:58 +02:00
Zaiming Shi
05c5378265 feat(http_lib): add normalise_headers API 2021-05-07 10:14:19 +08:00
Zaiming Shi
f8700e3f27 fix(emqx_packet): no crash if publish packet has no data 2021-05-04 13:48:35 +02:00
Zaiming Shi
29475eb610 feat(emqx_http_lib): try to parse host ip 2021-04-28 10:43:36 +02:00
Zaiming Shi
eb946eb80c fix(emqx_trie): do not try to match wildcard topics 2021-04-26 14:18:40 +02:00
Zaiming Shi
22e72cdd82 refactor(emqx_trie): rename record from eqmx_topic to emqx_trie 2021-04-26 14:18:40 +02:00
Zaiming Shi
bc6a87946c refactor(emqx_trie): store only prefixes
This commit refactors emqx_trie implementation
with mainly two changes

1. Deleted the edge table.

   In the old implementation, trie consist of nodes and edges.
   e.g. for topic 'a/b/+/d', node 'a' with edge 'b'
   points to node 'a/b' and so on.

   However, edges can be computed at runtime,
   so there is no need to store them in a table.
2021-04-26 14:18:40 +02:00
Zaiming Shi
d61b100cc9 chore: more copyright updates 2021-04-23 20:43:00 +02:00
Zaiming Shi
6354e75626 chore: update copyrights 2021-04-23 20:43:00 +02:00
Zaiming Shi
c81df7278f test(trace): split test case 2021-04-23 06:54:10 +02:00
Zaiming Shi
3547dc4c93 fix(log): client id as string for log metadata
so it does not print <<"...">> to the logs
2021-04-23 06:54:10 +02:00
Zaiming Shi
fd69969014 refactor(logging): Log to single line 2021-04-23 06:54:10 +02:00
JianBo He
1f258a0499 test(proper): fix cant_generate error 2021-04-19 22:03:51 +02:00
Shawn
47817ea28d fix(emqx): meck emqx_connection:call/3 in testcase 2021-04-16 13:37:24 +08:00
Shawn
4885171e4f fix(emqx): add timeout for open/kick a session 2021-04-15 23:09:58 +08:00
Shawn
ebac8c1612 fix(emqx): set the timetrap of emqx_cm_SUITE to 1 min 2021-04-15 23:09:58 +08:00
JianBo He
04cbb3751d test(proper): wait tcp port closed 2021-04-15 21:18:17 +08:00
JianBo He
4a388400a5 test(proper): ensure epmd started 2021-04-14 19:38:56 +08:00