From 6f959e57844db149a73f260f24e96a41c949f88e Mon Sep 17 00:00:00 2001 From: Shawn <506895667@qq.com> Date: Sat, 6 May 2023 15:20:28 +0800 Subject: [PATCH] chore: update the change logs for v4.4.19 --- changes/v4.4.19-en.md | 32 ++++++++++++++++++++++++++++++++ changes/v4.4.19-zh.md | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 changes/v4.4.19-en.md create mode 100644 changes/v4.4.19-zh.md diff --git a/changes/v4.4.19-en.md b/changes/v4.4.19-en.md new file mode 100644 index 000000000..9501c0f9f --- /dev/null +++ b/changes/v4.4.19-en.md @@ -0,0 +1,32 @@ +# v4.4.19 + +## Enhancements + +- Improving error logs related to Proxy Protocol [emqx/esockd#177](https://github.com/emqx/esockd/pull/177). + + The sample logs before this improvement: + ``` + 2023-04-20T14:56:51.671735+08:00 [error] supervisor: 'esockd_connection_sup - <0.2537.0>', errorContext: connection_shutdown, reason: {invalid_proxy_info,<<"f\n">>}, offender: [{pid,<0.3192.0>},{name,connection},{mfargs,{...}}] + + 2023-04-20T14:57:01.348275+08:00 [error] supervisor: 'esockd_connection_sup - <0.2537.0>', errorContext: connection_shutdown, reason: {proxy_proto_timeout,5000}, offender: [{pid,<0.3194.0>},{name,connection},{mfargs,{...}}] + ``` + After the improvement: + ``` + 2023-04-20T18:07:06.180134+08:00 [error] [esockd_proxy_protocol] The listener 127.0.0.1:8883 is working in proxy protocol mode, but received invalid proxy_protocol header, raw_bytes=<<"f\n">> + + 2023-04-20T18:10:17.205436+08:00 [error] [esockd_proxy_protocol] The listener 127.0.0.1:8883 is working in proxy protocol mode, but timed out while waiting for proxy_protocol header + ``` + +## Bug fixes + +- Fixed an issue where the rule engine was unable to access variables exported by `FOREACH` in the `DO` clause [#10620](https://github.com/emqx/emqx/pull/10620). + + Given a payload: `{"date": "2023-05-06", "array": ["a"]}`, as well as the following SQL statement: + ``` + FOREACH payload.date as date, payload.array as elem + DO date, elem + FROM "t/#" + ``` + Prior to the fix, the `date` variable exported by `FOREACH` could not be accessed in the `DO` clause of the above SQL, resulting in the following output for the SQL statement: + `[{"elem": "a","date": "undefined"}]`. + After the fix, the output of the SQL statement is: `[{"elem": "a","date": "2023-05-06"}]` diff --git a/changes/v4.4.19-zh.md b/changes/v4.4.19-zh.md new file mode 100644 index 000000000..37a54ecf2 --- /dev/null +++ b/changes/v4.4.19-zh.md @@ -0,0 +1,32 @@ +# v4.4.19 + +## 增强 + +- 改进 Proxy Protocol 相关的错误日志 [emqx/esockd#177](https://github.com/emqx/esockd/pull/177)。 + + 改进之前的日志样例: + ``` + 2023-04-20T14:56:51.671735+08:00 [error] supervisor: 'esockd_connection_sup - <0.2537.0>', errorContext: connection_shutdown, reason: {invalid_proxy_info,<<"f\n">>}, offender: [{pid,<0.3192.0>},{name,connection},{mfargs,{...}}] + + 2023-04-20T14:57:01.348275+08:00 [error] supervisor: 'esockd_connection_sup - <0.2537.0>', errorContext: connection_shutdown, reason: {proxy_proto_timeout,5000}, offender: [{pid,<0.3194.0>},{name,connection},{mfargs,{...}}] + ``` + 改进之后: + ``` + 2023-04-20T18:07:06.180134+08:00 [error] [esockd_proxy_protocol] The listener 127.0.0.1:8883 is working in proxy protocol mode, but received invalid proxy_protocol header, raw_bytes=<<"f\n">> + + 2023-04-20T18:10:17.205436+08:00 [error] [esockd_proxy_protocol] The listener 127.0.0.1:8883 is working in proxy protocol mode, but timed out while waiting for proxy_protocol header + ``` + +## 修复 + +- 修复规则引擎无法在 `DO` 子句中访问 `FOREACH` 导出的变量的问题 [#10620](https://github.com/emqx/emqx/pull/10620)。 + + 给定消息:`{"date": "2023-05-06", "array": ["a"]}`,以及如下 SQL 语句: + ``` + FOREACH payload.date as date, payload.array as elem + DO date, elem + FROM "t/#" + ``` + 修复前,以上 SQL 语句中 `FOREACH` 导出的 `date` 变量无法在 `DO` 子句中访问,导致以上 SQL 的输出为: + `[{"elem": "a","date": "undefined"}]`。 + 修复后,SQL 的输出为:`[{"elem": "a","date": "2023-05-06"}]`