Commit Graph

13835 Commits

Author SHA1 Message Date
Andrew Mayorov
a530ccbe3d
Merge pull request #10095 from fix/EEC-782/mysql-prepstmt-exhaustion
fix(mysql): be explicit that batch queries are parameterless
2023-03-14 10:21:45 +03:00
Zaiming (Stone) Shi
102f427aac
Merge pull request #10125 from tom-tschiller/bugfix/emqx-helm-fix-service-annotations
fix(helm-charts): fix for multiple service annotations
2023-03-14 06:19:06 +01:00
Thales Macedo Garitezi
823128dfc7
Merge pull request #10127 from thalesmg/rm-rebar3-emqx-app-master
chore: remove committed rebar3 binary
2023-03-13 16:33:57 -03:00
Kjell Winblad
87ede1b1f7
Merge pull request #10124 from kjellwinblad/kjell/mongodb/default_heartbeat
fix: increase heartbeat time to avoid extreme MongoDB logging
2023-03-13 18:56:49 +01:00
Thales Macedo Garitezi
25c28eab81 chore: remove committed rebar3 binary
We already set up our custom rebar3 binary in CI, so this doesn't need
to be committed.  It is also outdated with our currently used version.
2023-03-13 14:11:39 -03:00
Stefan Strigler
62aec87c56
Merge pull request #10107 from sstrigler/EMQX-9147-bridges-api-fix-handling-unknown-bridge-id
Bridges API: fix handling unknown bridge-id
2023-03-13 16:40:46 +01:00
Thomas Schmid
75ce870cbe fix(helm-charts): fix for multiple service annotations
Fix to support adding multiple service annotations
2023-03-13 15:36:43 +01:00
Kjell Winblad
1cf01197bb fix: increase heartbeat time to avoid extreme MongoDB logging
Our MongoDB driver creates a new temporary connection, for every active
connection, to just do a single heartbeat test. There is configurable
delay between every heartbeat test. When the user has an EMQX cluster
with a MongoDB bridge (to a MongoDB replica set), there will be a lot of
connections. Furthermore, as MongoDB creates a log entry every time a
new connection is created, the log will be flooded with info about new
connection. One user have reported more than 1MB of log data in a 10
minute period.

This commit tries to fix this by increasing the default delay between
heartbeats. A better fix would be to change the MongoDB driver so that
it does not create a new connection just to do a heartbeat check, but
this is more complicated so we leave this to the future. We might also
swap out the current MongoDB driver to something better.

Fixes:
https://github.com/emqx/emqx/issues/9851
2023-03-13 14:58:53 +01:00
Zaiming (Stone) Shi
0c5ab5183a
Merge pull request #10109 from zmstone/0308-stop-releasing-schema.json-in-rel-package
0308 stop releasing schema.json in rel package
2023-03-13 14:27:15 +01:00
Stefan Strigler
18c3b9bb1c style: fix wording 2023-03-13 11:14:59 +01:00
Kjell Winblad
baf39fe080
Merge pull request #10098 from kjellwinblad/kjell/fix/mongo_authz_crash
fix: mongodb authz crash
2023-03-13 10:46:49 +01:00
Stefan Strigler
c1adf0de1f test(emqx_bridge): increase coverage by adding common edge cases 2023-03-13 10:40:47 +01:00
Stefan Strigler
478601ee41 fix(emqx_bridge): remove unreachable code paths 2023-03-13 10:40:47 +01:00
Stefan Strigler
dba95ec0fa style(emqx_bridge): fix wording 2023-03-13 10:40:47 +01:00
Stefan Strigler
71ec77a2f2 fix(emqx_bridge): for node operation check if node is part of cluster
This fixes the case where we returned `501 NOT IMPLEMENTED` in the past.
2023-03-13 10:40:47 +01:00
Stefan Strigler
7124600a71 docs(emqx_bridge): add start as operation to bridge 2023-03-13 10:38:51 +01:00
Stefan Strigler
cf73aacd7b chore: add changelog 2023-03-13 10:38:51 +01:00
Stefan Strigler
1bcc5623ed fix(emqx_bridge): check if bridge enabled before calling op 2023-03-13 10:38:49 +01:00
Stefan Strigler
a325133391 fix(emqx_bridge): don't crash checking if bridge enabled 2023-03-13 10:37:28 +01:00
Stefan Strigler
80b81748df fix(emqx_bridge): handle bridge not found in call_operation 2023-03-13 10:37:28 +01:00
Stefan Strigler
fb3d101b3a refactor(emqx_bridge): fix var names 2023-03-13 10:37:28 +01:00
Stefan Strigler
e31f4d6091 refactor(emqx_bridge): add BAD_REQUEST macro and minor cleanups 2023-03-13 10:37:28 +01:00
lafirest
e8cf604ad4
Merge pull request #9893 from lafirest/feat/filiter_banned
feat(banned): filter out banned messages from mqueue
2023-03-13 09:58:39 +08:00
ieQu1
1e23f15bce
Merge pull request #10118 from ieQu1/mria-0.4.0
chore(mria): Bump version to 0.4.0
2023-03-11 19:08:56 +01:00
ieQu1
e3595f2e79 chore(mria): Bump version to 0.4.0 2023-03-11 00:37:25 +01:00
Andrew Mayorov
f7c0d29478
test(tde): add testcase for a nasty string in SQL query
Similar to what we have in mysql and pgqsl testsuites.
2023-03-10 18:43:30 +03:00
Andrew Mayorov
e571b602b8
chore: bump app versions + add changelog
Bump `emqx_plugin_libs` app version to 4.3.7.
2023-03-10 18:43:19 +03:00
Andrew Mayorov
781942cc4f
chore: drop unused macrodefs 2023-03-10 18:42:04 +03:00
Andrew Mayorov
0a7f6c7d03
fix(mysql): ensure proper escaping in batch inserts
Also hexencode non-utf8 binaries. This is essentially an heuristic.
We don't know column types in runtime, and there's no simple way
to find them out. Since we're already doing full binary scan during
escaping it should be cheap to bail out on non-utf8 strings and
hexencode them instead.

Also introduce separate function to highlight that this escaping
is MySQL-specific.
2023-03-10 18:42:04 +03:00
Andrew Mayorov
fc37d9b3cd
fix(mysql): be explicit that batch queries are parameterless
So that mysql client won't attempt to prepare them automatically, thus
trashing the server's prepared statements table and making interaction
overall heavier.
2023-03-10 18:42:04 +03:00
Andrew Mayorov
225cbab9ce
ci(mysql): drop outdated config options
Also make them look as recommended in the documentation.
2023-03-10 18:42:00 +03:00
Andrew Mayorov
0403c3c195
Merge pull request #10115 from keynslug/fix/bump-apps-vsn
chore: bump app versions following last merge-back
2023-03-10 17:19:15 +03:00
Andrew Mayorov
a86d06f043
chore: bump app versions following last merge-back 2023-03-10 16:44:15 +03:00
Ilya Averyanov
5650ad20f8
Merge pull request #10100 from savonarola/0308-fix-scram-auth
Fix channel crash for slow clients with enhanced authentication
2023-03-10 12:58:43 +02:00
Zaiming (Stone) Shi
f9151f2903
Merge pull request #10112 from id/0310-merge-release-50-to-master
0310 merge release 50 to master
2023-03-10 09:46:52 +01:00
Ivan Dyachkov
b02eb2104c chore: update information about 5.0 series release branch 2023-03-10 08:56:17 +01:00
Ivan Dyachkov
951e89134c Merge remote-tracking branch 'upstream/release-50' into 0310-merge-release-50-to-master 2023-03-10 08:48:32 +01:00
Ivan Dyachkov
203885ead5
Merge pull request #10110 from zmstone/0309-release-v5.0.20-and-e5.0.1
0309 release v5.0.20 and e5.0.1
2023-03-10 07:37:49 +00:00
Zaiming (Stone) Shi
f231042e76 chore: Generate changelog for e5.0.1 and v5.0.20 2023-03-09 18:47:02 +01:00
Zaiming (Stone) Shi
5bdb85b04f build: add a script to find previous release version tag 2023-03-09 18:34:26 +01:00
Zaiming (Stone) Shi
e4ce9e1111 chore: make possible to debug format-changelog.sh 2023-03-09 18:34:26 +01:00
Zaiming (Stone) Shi
9bba9b47c7 chore: allow untracked files to exist when cutting release 2023-03-09 18:34:26 +01:00
Zaiming (Stone) Shi
b0e6b290ff chore: allow no changelog diff when cutting a release 2023-03-09 18:34:26 +01:00
Zaiming (Stone) Shi
16f6789c9c chore: update script print info 2023-03-09 18:34:26 +01:00
Zaiming (Stone) Shi
3f461f312a chore: bump version to e5.0.1 and v5.0.20 2023-03-09 18:34:26 +01:00
Zaiming (Stone) Shi
e326d03ec5
Merge pull request #10096 from zmstone/0308-merge-release-50-back-to-master
0308 merge release 50 back to master
2023-03-09 18:33:31 +01:00
Zaiming (Stone) Shi
6ebc31a929
Merge pull request #10104 from JimMoen/refine-changes-for-release-50
Refine changes for release 50
2023-03-09 18:33:00 +01:00
Ilya Averyanov
cba0287439 fix(mqtt): fix channel crash for slow clients with enhanced authn 2023-03-09 17:27:24 +02:00
Zaiming (Stone) Shi
ab4b3dd60a build: generate docs per profile 2023-03-09 16:03:01 +01:00
Kjell Winblad
aa57ea9ee1 fix: mongodb authz crash
This fixes a crash with an error in the log file (see below) that
happened when the MongoDB authorization module queried the database. The
reason is that the collection name that was sent to the mongodb
connection was an atom. This is fixed by making sure it is not an atom.

2023-03-08T17:16:34.215523+01:00 [error] msg: query_mongo_error, mfa:
emqx_authz_mongodb:authorize/4, line: 95, peername: 127.0.0.1:53212,
clientid: client123, collection: mqtt_acl, filter: #{username =>
<<"emqx_u">>}, reason: {resource_error,#{msg => #{error =>
{error,{error_cannot_parse_response,{op_msg_response,#{<<"code">> =>
73,<<"codeName">> => <<"InvalidNamespace">>,<<"errmsg">> => <<"Failed to
parse namespace element">>,<<"ok">> => 0.0}}}},id =>
<<"emqx_authz_mongodb:3">>,name => call_query,request =>
{find,mqtt_acl,#{username => <<"emqx_u">>},#{}},stacktrace =>
[{mc_connection_man,reply,1,[{file,"mc_connection_man.erl"},{line,123}],
...]}, reason => exception}}, resource_id: <<"emqx_authz_mongodb:3">>

Fixes: https://github.com/emqx/emqx/issues/9783
2023-03-09 16:01:23 +01:00