Commit Graph

17377 Commits

Author SHA1 Message Date
Andrew Mayorov
166375a000
fix(topicidx): make get_record/2 simpler to use in concurrent env
The mechanic of `emqx_topic_index` cannot really guarantee atomicity
of reading records associated with index matches, so instead it's
probably better to make the user aware of that lack of this guarantee.
2023-08-28 13:52:59 +04:00
Andrew Mayorov
84e40fb6fe
test(trie): add more involved route add + delete case
That shows how current local trie implementation breaks because
of lack of refcounting.
2023-08-28 13:52:59 +04:00
Andrew Mayorov
dcb63440bc
refactor(mgmt): avoid dealing with router tab directly
Instead, contain all this behind `emqx_router` module interface.
2023-08-28 13:52:59 +04:00
Andrew Mayorov
9eccfa0909
refactor(router): isolate cleanup logic in router module 2023-08-28 13:52:59 +04:00
Andrew Mayorov
b74ff10705
Merge pull request #11517 from keynslug/ft/topic-index-v3
feat(topicidx): iterate on trie search implementation
2023-08-28 12:24:16 +04:00
zhongwencool
d7f6d02270
Merge pull request #11523 from zhongwencool/emqx-conf-suggest-message
fix: improve the suggest msg for update conf failed
2023-08-28 14:44:12 +08:00
zhongwencool
fe37842b11 chore: update 11523 changelog 2023-08-28 11:27:32 +08:00
zhongwencool
053b7fb94a test: add more test for conf_cli 2023-08-28 11:14:36 +08:00
zhongwencool
d8be248a3d fix: improve the suggest msg for update conf failed 2023-08-28 08:53:23 +08:00
zhongwencool
b874926de7
Merge pull request #11514 from zhongwencool/stop-load-application-before-reboot
fix: stop otel deps appication before reboot
2023-08-27 20:46:31 +08:00
Paulo Zulato
2bb415f897
Merge pull request #11526 from paulozulato/fix-validator-return-msg
fix: flatten error message on resource validator
2023-08-25 17:27:31 -03:00
Paulo Zulato
84e68f8ed8
Merge pull request #11508 from paulozulato/fix-azure-msg-error-handling
fix(kafka): fix result handling when sending message with invalid header
2023-08-25 14:57:09 -03:00
Paulo Zulato
42877e282d fix: flatten error message on resource validator
Fixes https://emqx.atlassian.net/browse/EMQX-10864
2023-08-25 13:53:52 -03:00
Paulo Zulato
cb1e105e19
Merge pull request #11516 from paulozulato/fix-kafka-aeh-client-unique-id
Fix Kafka/AEH ClientId uniqueness
2023-08-25 10:14:44 -03:00
zhongwencool
b59ec09266
Merge pull request #11520 from zhongwencool/packet-connack-sent-count-error 2023-08-25 21:00:06 +08:00
Andrew Mayorov
d5cff533e3
chore(topicidx): drop TODO comment 2023-08-25 16:44:03 +04:00
Andrew Mayorov
ca59a87d47
chore(topicidx): refine example of wildcard compare 2023-08-25 16:44:03 +04:00
Zaiming (Stone) Shi
558402a68e
chore(topic_index): add topic validation 2023-08-25 16:44:03 +04:00
Andrew Mayorov
33ed53bb6a
refactor(topicidx): simplify compare/3 further
It's possible to emit seek instruction just once, on the way back
out of the `compare/3` stack.
2023-08-25 16:34:45 +04:00
Andrew Mayorov
fc37d235c7
refactor(topicidx): simplify seek instructions
Which also avoids comparing filter tail repeatedly when evaluating
it.
2023-08-25 15:24:06 +04:00
zhongwencool
c8af5a702c test: remove connection_closed from test 2023-08-25 15:53:35 +08:00
zhongwencool
fc1738188e fix: packets_connack_sent is not incremented if the ack_flag field in the CONNACK packet is non-zero 2023-08-25 15:18:34 +08:00
lafirest
ba9cb0a1ed
Merge pull request #11512 from lafirest/fix/ldap_def_port
fix(ldap): expose request_timeout to prevent infinite hang
2023-08-25 10:22:44 +08:00
zhongwencool
8ab6eb5638 test: start emqx_opentelemetry in emqx_machine SUITE 2023-08-25 10:09:00 +08:00
Andrew Mayorov
cf45e80c71
feat(topicidx): iterate on trie search implementation
This improves matching performance and decreases GC pressure on
synthetic workloads.
2023-08-25 01:47:11 +04:00
Paulo Zulato
535c7f8b43 fix(kafka): avoid ClientId collision between Kafka and Azure bridges
Fixes https://emqx.atlassian.net/browse/EMQX-10860
2023-08-24 18:46:22 -03:00
Thales Macedo Garitezi
d9a5a9ea2b
Merge pull request #11513 from thalesmg/kafka-fix-ts-template-r52-20230824
fix: use correct timestamp template for kafka and remove such fields from azure event hub producer
2023-08-24 16:26:52 -03:00
Thales Macedo Garitezi
4ac0972979
Merge pull request #11501 from thalesmg/gcp-consu-err401-r52-20230823
fix(gcp_consumer): handle 401 errors
2023-08-24 15:42:26 -03:00
Thales Macedo Garitezi
016ae0524f fix(aeh_producer): remove timestamp template field
Fixes https://emqx.atlassian.net/browse/EMQX-10847

Checking the whole Kafka message from AEH, it seems like the timestamp type is append,
which means that it’s the broker who controls the timestamp, and the timestamp defined by
the producer is ignored.

Ref: https://kafka.apache.org/documentation/#brokerconfigs_log.message.timestamp.type

Example message consumed from AEH:
```
%{
  "headers" => %{},
  "key" => "",
  "offset" => 4,
  "topic" => "test0",
  "ts" => 1692879703006,
  "ts_type" => "append",
  "value" => "{\"username\":\"undefined\",\"topic\":\"t/aeh/produ\",\"timestamp\":1692879692189,\"qos\":0,\"publish_received_at\":1692879692189,\"pub_props\":{\"User-Property\":{}},\"peerhost\":\"undefined\",\"payload\":\"aaaa\",\"node\":\"emqx@127.0.0.1\",\"metadata\":{\"rule_id\":\"rule_aehp\"},\"id\":\"000603AA44B34E08F4AF000006E30003\",\"flags\":{},\"event\":\"message.publish\",\"clientid\":\"undefined\"}"
}
```

Note the ts_type above is append.

Example message from a Kafka broker whose ts type is create:
```
%{
  "headers" => %{},
  "key" => "",
  "offset" => 4,
  "topic" => "test-topic-three-partitions",
  "ts" => 1692881883668,
  "ts_type" => "create",
  "value" => "{\"username\":\"undefined\",\"topic\":\"t/kafka/produ\",\"timestamp\":1692881883668,\"qos\":0,\"publish_received_at\":1692881883668,\"pub_props\":{\"User-Property\":{}},\"peerhost\":\"undefined\",\"payload\":\"aaaaaa\",\"node\":\"emqx@127.0.0.1\",\"id\":\"000603AAC7529FEEF4AC000007050000\",\"flags\":{},\"event\":\"message.publish\",\"clientid\":\"undefined\"}"
}
```

Unfortunately, I couldn’t find anywhere in AEH where that configuration could be changed.
2023-08-24 14:20:42 -03:00
Thales Macedo Garitezi
0381ac0410 fix(kafka_producer): use correct timestamp template field
Fixes https://emqx.atlassian.net/browse/EMQX-10847
2023-08-24 14:20:42 -03:00
Thales Macedo Garitezi
69dfc8e31d
Merge pull request #11505 from thalesmg/docker-eee-r52-20230823
ci(test_docker): export enterprise image with elixir for testing
2023-08-24 12:17:47 -03:00
zhongwencool
c215fe3736 fix: stop otel deps appication before reboot 2023-08-24 22:14:14 +08:00
Paulo Zulato
60e6217496 fix(kafka): fix result handling when sending message with invalid header
Fixes https://emqx.atlassian.net/browse/EMQX-10846
2023-08-24 10:41:42 -03:00
Thales Macedo Garitezi
0037295c83 ci(test_docker): export enterprise image with elixir for testing 2023-08-24 10:27:25 -03:00
Thales Macedo Garitezi
e5041de9cc fix(gcp_consumer): handle 401 errors
Fixes https://emqx.atlassian.net/browse/EMQX-10852
2023-08-24 09:03:34 -03:00
Zaiming (Stone) Shi
62423b0b12 refactor(topic_index): less special handling for leading $ words 2023-08-24 13:30:10 +02:00
Zaiming (Stone) Shi
a30d87e14f refactor(topic_index): remove more unnecessary next calls
also avoid using records (setelement) for recursive return values
2023-08-24 12:25:04 +02:00
Zaiming (Stone) Shi
a1e6635614 refactor(topic_index): no forced ceiling entry in index table 2023-08-24 12:25:04 +02:00
Zaiming (Stone) Shi
f4c8c6be55 refactor(topic_index): optimize trie-search performance 2023-08-24 12:25:04 +02:00
Zaiming (Stone) Shi
6b152b3cb7 test: add more debug output 2023-08-24 12:25:04 +02:00
Zaiming (Stone) Shi
ae094e363c chore: fix a typo in log message 2023-08-24 12:25:04 +02:00
firest
6085442958 fix(ldap): expose request_timeout to prevent infinite hang 2023-08-24 16:50:38 +08:00
zhongwencool
2322b27542
Merge pull request #11497 from zhongwencool/prometheus-metrics
Prometheus metrics
2023-08-24 12:06:32 +08:00
zhongwencool
f00395b237
Merge pull request #11466 from zhongwencool/hocon-converter-not-running
fix: hocon converter not working when make_serializable is true
2023-08-24 10:00:16 +08:00
zhongwencool
8d2be27ade chore: add changlog for 11466 2023-08-24 06:46:50 +08:00
zhongwencool
84dd3b83bb fix: hocon converter not working when make_serializable is true(check_plain) 2023-08-24 06:46:47 +08:00
zhongwencool
f72ba6819f
Merge pull request #11498 from zhongwencool/fix-otel-stop-error-log
fix: stop otel deps application in terminate crashed
2023-08-24 06:40:24 +08:00
Ilya Averyanov
3aa15556a9
Merge pull request #11504 from savonarola/0823-fix-pytest-retry-release-52
chore(ci): pin pytest-retry version
2023-08-23 18:44:07 +03:00
Ilya Averyanov
92a293a67b chore(ci): pin pytest-retry version 2023-08-23 17:34:15 +03:00
zhongwencool
bc460b8887
Merge pull request #11496 from zhongwencool/erlang-prometheus-collector-disabled-default
feat: disabled the Erlang VM Prometheus exporter by default
2023-08-23 17:09:07 +08:00