Commit Graph

16885 Commits

Author SHA1 Message Date
Thales Macedo Garitezi
7a16ff4f04 fix(postgres_bridge): fix table existence check and handle sync_required
Fixes https://emqx.atlassian.net/browse/EMQX-10629

During health checking, we check whether tables in the SQL statement
exist.  Such check was done by asking the backend to parse the
statement using a named prepared statements.  Concurrent health checks
could then result in the error:

```erlang
{error,{error,error,<<"42P05">>,duplicate_prepared_statement,<<"prepared statement \"get_status\" already exists">>,[{file,<<"prepare.c">>},{line,<<"451">>},{routine,<<"StorePreparedStatement">>},{severity,<<"ERROR">>}]}}
```

This could lead to an inconsistent state in the driver process, which
would crash later when a message from the backend (`READY_FOR_QUERY`, "idle"):

```
  2023-07-24T13:05:58.892043+00:00 [error] Generic server <0.2134.0> terminating. Reason: {'module could not be loaded',[{undefined,handle_message,[90,<<"I">>,...
```

Added calls to `epgsql:sync/1` for functions that could return
`{error, sync_required}`.

Also, redundant calls to `parse2` were removed to reduce the number of requests.
2023-07-25 09:15:14 -03:00
lafirest
a35df30b28
Merge pull request #11331 from lafirest/fix/nested_put
fix(nested_put): fix a data loss bug introduced by #11172
2023-07-24 18:51:11 +08:00
firest
af6405fa25 fix(nested_put): fix a data loss bug introduced by #11172 2023-07-24 16:39:37 +08:00
JimMoen
3304e32ea1
Merge pull request #11282 from JimMoen/perf-get-all-rule
feat(index): add topic index facility
2023-07-24 11:50:32 +08:00
JianBo He
e4afb333da
Merge pull request #11330 from lafirest/fix/dy_def_tmp
chore(dynamo): fix default template example
2023-07-24 09:37:13 +08:00
JimMoen
c393c2e091
test: ets table cleanup after cases 2023-07-24 09:33:28 +08:00
JimMoen
4e4b1ac115
refactor: module move to app emqx_rule_engine
- Rename to emqx_rule_index.erl
- Remove test funcs from src -> test dir
2023-07-24 09:33:28 +08:00
Andrew Mayorov
b821bdee00
perf(ruleeng): employ emqx_topic_index to speed up topic matching 2023-07-24 09:27:31 +08:00
Andrew Mayorov
28dad5d7a9
feat(index): add topic index facility
Somewhat similar to `emqx_trie` in design and logic, yet built on
top of a single, potentially pre-existing table.
2023-07-24 09:27:31 +08:00
firest
daa364955f chore(dynamo): fix default template example 2023-07-22 17:47:15 +08:00
Paulo Zulato
31cf05ec66
Merge pull request #11316 from paulozulato/fix-oracle-pool-size
fix(oracle): fix Pool Size parameter retrieval
2023-07-21 17:51:21 -03:00
Thales Macedo Garitezi
2531c3e7d1
Merge pull request #11306 from thalesmg/rule-actions-reply-dropped-r51-20230719
fix(rule_metrics): notify rule metrics of late replies and expired requests
2023-07-21 16:51:14 -03:00
Ivan Dyachkov
6e1776a73c
Merge pull request #11328 from id/0721-e5.1.1-alpha.4 2023-07-21 19:54:14 +02:00
Ivan Dyachkov
29432009db chore: 5.1.1-alpha.4 2023-07-21 18:42:14 +02:00
zhongwencool
76132389d9
Merge pull request #11284 from HJianBo/fix-the-config-desc
chore: improve the `sys_msg_interval` config docs
2023-07-21 23:01:35 +08:00
Paulo Zulato
85ab97970f fix(oracle): fix Pool Size parameter retrieval
Fixes https://emqx.atlassian.net/browse/EMQX-10599
2023-07-21 11:02:27 -03:00
SergeTupchiy
04bd7c7eed
Merge pull request #11322 from SergeTupchiy/EMQX-10590-data-import-fix-missing-config-rel51
EMQX-10590 data import fix missing config relealse 51
2023-07-21 12:36:21 +03:00
JianBo He
16a8943cb2
Merge pull request #11323 from zhongwencool/remove-zone-related-doc
chore: remove zone desc from document
2023-07-21 17:20:07 +08:00
Serge Tupchii
ee97cf8e33 fix(emqx_modules): ignore already_existed/not_found errors for added/removed topic metrics 2023-07-21 12:17:47 +03:00
Ivan Dyachkov
5feb3c537e
Merge pull request #11324 from ieQu1/changelog-11309 2023-07-21 10:55:16 +02:00
ieQu1
c73bbd1d8f chore(changelog): Add changelog for 11309 2023-07-21 10:53:18 +02:00
zhongwencool
520ae0e9d3 chore: remove zone desc from document 2023-07-21 15:51:21 +08:00
zhongwencool
87b2df3a30
Merge pull request #11318 from zhongwencool/bump-hocon-to-0.39.14
fix: hocon_pp quote string for special char
2023-07-21 15:46:37 +08:00
Serge Tupchii
b37920d2e5 feat: add topic_metrics and slow_subs configuration to data import/export
Fixes: EMQX-10590
2023-07-21 10:41:22 +03:00
Serge Tupchii
a1a7c4fab6 fix(emqx_rule_engine): fix typo in behaviour module attribute
The type resulted in missing `rule_engine` config after importing data from a backup file.

Fixes: EMQX-10590
2023-07-21 10:33:56 +03:00
zhongwencool
d3e4fda21d fix: hocon_pp quote string for special char 2023-07-21 12:31:22 +08:00
Paulo Zulato
0827a45c89
Merge pull request #11307 from paulozulato/fix-oracle-table-check
fix(oracle): discard nested tokens when checking table
2023-07-20 19:19:50 -03:00
Thales Macedo Garitezi
54efc04a6f
Merge pull request #11309 from thalesmg/fix-machine-boot-reboot-r51-20230719
fix(machine_boot): use shared list of reboot apps and add bridges to reboot list
2023-07-20 14:33:16 -03:00
Thales Macedo Garitezi
6cd503865b fix(machine_boot): ensure emqx_bridge starts after its companion apps
We need to reverse the dependency of `emqx_bridge` and `emqx_bridge_*`, because the former
loads and starts bridges during its application startup.  If the individual bridge
application being loaded has not started with its dependencies, the supervision tree will
not be ready for that.
2023-07-20 13:11:44 -03:00
zhongwencool
5240ba70d4
Merge pull request #11311 from zhongwencool/improve-failed-message
chore: add more detail msg for merging failed
2023-07-20 22:24:28 +08:00
Thales Macedo Garitezi
3b1e436d3f refactor: use emqx_pool:async_submit to avoid excessive spawning 2023-07-20 10:17:43 -03:00
JianBo He
b9f0cd7ba4 chore: pretty the cli output style 2023-07-20 21:01:28 +08:00
Thales Macedo Garitezi
77e2d852e5 fix: add emqx_durable_storage to app list 2023-07-20 09:55:05 -03:00
Thales Macedo Garitezi
89ea40a8b7 refactor: apply review remarks 2023-07-20 09:31:13 -03:00
zhongwencool
3cd223ff5b chore: add more detail msg for merging failed 2023-07-20 17:48:26 +08:00
Thales Macedo Garitezi
b9b11d8f4d fix(machine_boot): use shared list of reboot apps and add bridges to reboot list 2023-07-19 20:15:42 -03:00
Paulo Zulato
e76ba760c9 fix(oracle): discard nested tokens when checking table
Fixes https://emqx.atlassian.net/browse/EMQX-10597
2023-07-19 15:03:49 -03:00
Thales Macedo Garitezi
eb41b77de4 fix(rule_metrics): notify rule metrics of late replies and expired requests
Fixes https://emqx.atlassian.net/browse/EMQX-10600
2023-07-19 11:39:28 -03:00
ieQu1
57e39f42c5
Merge pull request #11294 from ieQu1/mria-fixes
Mria fixes
2023-07-19 15:10:42 +02:00
lafirest
d4550f911c
Merge pull request #11299 from lafirest/hs
fix(hstream): handle the `unavailable` error code
2023-07-19 17:47:30 +08:00
JianBo He
89b5cda2a3
Merge pull request #11274 from zhongwencool/fix-get-config-from-target-node
fix: get_config return target node's node conf
2023-07-19 16:01:13 +08:00
firest
7ac8715358 fix(hstream): handle the unavailable error code
The "unavailable" error code just means that the HStream is warming up or busy, HStream guarantees that a retry will work well.
2023-07-19 14:43:50 +08:00
zhongwencool
0524c3b3b1 test: configs SUITE crash 2023-07-19 11:05:14 +08:00
JianBo He
439eb4d029 test: cover the node params for get /configs endpoint 2023-07-19 11:05:14 +08:00
JianBo He
74532a64e6 chore: update apps/emqx_management/src/emqx_mgmt_api_configs.erl 2023-07-19 11:05:14 +08:00
zhongwencool
402f75592e chore: move rpc call from emqx_management_proto to emqx_conf_proto 2023-07-19 11:05:14 +08:00
zhongwencool
8a0f7bfd99 chore: update version bpapi.versions 2023-07-19 11:05:14 +08:00
zhongwencool
59ed65787f fix: get_config return target node's node conf 2023-07-19 11:05:14 +08:00
ieQu1
3a5112829c fix(mgmt_cli): Don't print cluster status on the replicant 2023-07-18 21:45:00 +02:00
ieQu1
ce76d4ab04 chore(ekka): Bump version to 0.15.7 (mria 0.5.9) 2023-07-18 21:45:00 +02:00