chore: update the change logs for v4.4.19

This commit is contained in:
Shawn 2023-05-06 15:20:28 +08:00
parent 58cbc7411b
commit 6f959e5784
2 changed files with 64 additions and 0 deletions

32
changes/v4.4.19-en.md Normal file
View File

@ -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"}]`

32
changes/v4.4.19-zh.md Normal file
View File

@ -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"}]`