Commit Graph

159 Commits

Author SHA1 Message Date
Andrew Mayorov
f7e3afde16
test(ds): avoid introducing new macros 2024-03-07 16:49:20 +01:00
Andrew Mayorov
69427dc42d
test(ds): add tests for error mapping and replay recovery 2024-03-07 12:59:58 +01:00
Andrew Mayorov
09905d78cd
chore(ds): make error handling slightly simpler
Co-Authored-By: Thales Macedo Garitezi <thalesmg@gmail.com>
2024-03-07 12:59:57 +01:00
Andrew Mayorov
b39c710ec2
fix(ds): tidy up few typespecs 2024-03-07 12:59:57 +01:00
Andrew Mayorov
2146d9e1fe
feat(ds): introduce error classes in critical API functions
For now, only recoverable / unrecoverable errors are introduced.
2024-03-07 12:59:57 +01:00
Thales Macedo Garitezi
5d87d400f4 feat(ds): add atomic store API
Part of https://emqx.atlassian.net/browse/EMQX-11841
2024-03-06 15:24:14 -03:00
Thales Macedo Garitezi
06334798a5 fix(ds): fix drop_generation typespec
This typespec fix will be used downstream by other backends.
2024-03-04 14:15:59 -03:00
Ilya Averyanov
b706caf294 feat(ds): export types 2024-02-29 14:27:18 +03:00
Ilya Averyanov
d5ae0e5c53 feat(ds): update delete/count interface 2024-02-28 22:51:24 +03:00
Ilya Averyanov
b010d34640 chore(ds): add delete callbacks 2024-02-26 17:35:13 +03:00
Zaiming (Stone) Shi
46877e979b chore: update copyright-year 2024-02-23 08:21:06 +01:00
Thales Macedo Garitezi
d469f4158e chore: bump app vsns 2024-02-20 16:53:57 -03:00
ieQu1
8cfb22f0b8
fix(ds): Retry getting the shard leader 2024-02-16 12:42:48 +01:00
ieQu1
280fcd8c52
Merge pull request #12437 from ieQu1/dev/optimize_make_filter
Optimize emqx_ds_bitmask_keymapper:make_filter function.
2024-02-05 17:32:28 +01:00
ieQu1
4665837cf0 fix(ds): Apply review remarks 2024-02-05 16:52:06 +01:00
ieQu1
c7888ad1f1
Merge pull request #12475 from ieQu1/dev/lean-stream
Use a more compact data structure to represent streams
2024-02-05 13:55:24 +01:00
ieQu1
698ba3f271 fix(ds): Optimize emqx_ds_bitmask_keymapper:make_filter
This optimization makes idle polling faster
2024-02-05 10:54:19 +01:00
ieQu1
8edbec5929 refactor(ds): Clarify the language used in ds_bitmapper 2024-02-05 10:54:18 +01:00
Zaiming (Stone) Shi
75023f2ca3
Merge pull request #12442 from ieQu1/dev/ds-license-apache
Relicense apps/emqx_durable_storage under Apache 2.0
2024-02-05 10:16:52 +01:00
ieQu1
2e56810ea2 refactor(ds): Use a simple improper list to represent the streams 2024-02-03 21:15:54 +01:00
ieQu1
3d2ac97c61 feat(ds): Add a CLI interface to inspect status of DS databases 2024-02-02 10:11:01 +01:00
ieQu1
139f5dc3bd chore(ds): Remove an obsolete document; superceded by ./README.md 2024-02-01 00:14:08 +01:00
ieQu1
b50d6bf1fd chore(ds): Change the license to Apache 2.0
Due to technicalities parts of the original code were licensed under
BSL.
In preparations for the public release of the feature, the license has
been changed to Apache 2.0
2024-02-01 00:10:48 +01:00
Thales Macedo Garitezi
f7b12470dd test(ds): fix inter-suite flakiness
Attempt to mitigate this frequent source of flakiness:

```
=CRASH REPORT==== 31-Jan-2024::17:30:15.025404 ===
  crasher:
    initial call: emqx_ds_replication_layer_egress:init/1
    pid: <0.11312.0>
    registered_name: []
    exception error: no match of right hand side value {error,
                                                        no_leader_for_shard}
      in function  emqx_ds_replication_layer_egress:init/1 (/emqx/apps/emqx_durable_storage/src/emqx_ds_replication_layer_egress.erl, line 93)
      in call from gen_server:init_it/2 (gen_server.erl, line 980)
      in call from gen_server:init_it/6 (gen_server.erl, line 935)
    ancestors: [<0.11310.0>,<0.11304.0>,emqx_ds_builtin_databases_sup,
                  emqx_ds_builtin_sup,emqx_ds_sup,<0.11236.0>]
    message_queue_len: 0
    messages: []
    links: [<0.11310.0>]
    dictionary: []
    trap_exit: true
    status: running
    heap_size: 376
    stack_size: 28
    reductions: 231
  neighbours:
```
2024-01-31 15:42:26 -03:00
Thales Macedo Garitezi
d51deac222 fix(ds): use configured data dir for site storage 2024-01-31 15:42:26 -03:00
JianBo He
35c4ef2ee2
Merge pull request #12407 from zmstone/0126-script-to-update-bsl-license-convert-time
0126 script to update bsl license convert time
2024-01-30 09:54:34 +08:00
ieQu1
7ee0a6aaa4
Merge pull request #12414 from ieQu1/dev/ds-readme
doc(ds): Update README
2024-01-29 18:01:03 +01:00
Zaiming (Stone) Shi
82403167c2 chore: update BSL license change date 2024-01-29 16:47:31 +01:00
ieQu1
2479e1189a fix(ds): Remove unused module 2024-01-29 00:36:13 +01:00
ieQu1
96c527541b docs(ds): Update README 2024-01-28 20:27:20 +01:00
ieQu1
eec56b0d6b fix(sessds): Improve comments 2024-01-26 17:49:33 +01:00
ieQu1
8e8d3af096 fix(sessds): Refactor emqx_persistent_session_ds to use CRUD module 2024-01-26 17:49:33 +01:00
Thales Macedo Garitezi
8e31afe6c2 fix(ds): don't make data dir part of the schema
The data directory was ending up being persisted in the database schema.  This led to
issues when opening the DB on different nodes.
2024-01-25 14:44:06 -03:00
ieQu1
305a54f646 chore(ds): Update BPAPI version 2024-01-24 19:33:30 +01:00
ieQu1
eee221f1d0 feat(ds): Make egress batching configurable 2024-01-24 19:33:30 +01:00
ieQu1
137535a821 feat(ds): Introduce egress process for the builtin backend 2024-01-24 19:33:30 +01:00
ieQu1
9b7df302e8 fix(ds): Cache database metadata in RAM 2024-01-24 18:43:48 +01:00
Thales Macedo Garitezi
1eb47d0c16 perf(ds): inherit only LTS paths containing wildcards when adding a new generation
Fixes https://github.com/emqx/emqx/pull/12338#discussion_r1462139499
2024-01-23 09:20:28 -03:00
Thales Macedo Garitezi
d122340c13
Merge pull request #12338 from thalesmg/ds-message-gc-20240115
feat(ds): add message GC
2024-01-22 16:57:26 -03:00
Thales Macedo Garitezi
db710c4be5 feat(lts): inherit previous generation's lts when possible 2024-01-22 14:53:17 -03:00
Thales Macedo Garitezi
75b08b525b feat(ds): add list_generations and drop_generation APIs 2024-01-22 14:53:17 -03:00
Thales Macedo Garitezi
57074015c6 feat(ds): allow customizing the data directory
The storage expectations for the RocksDB DB may be different from our usual data
directory.  Also, it may consume a lot more storage than other data.

This allows customizing the data directory for the builtin DS storage backend.

Note: if the cluster was already initialized using a directory path, changing that config
will have no effect.  This path is currently persisted in mnesia and used when reopening
the DB.
2024-01-19 13:07:24 -03:00
Thales Macedo Garitezi
7763b0fd34 chore: bump app vsns 2024-01-08 17:42:56 -03:00
Thales Macedo Garitezi
756980837c Merge branch 'release-54' into sync-r54-m-20240108 2024-01-08 17:39:42 -03:00
ieQu1
caf461fdf6 fix(ds): Don't start the supervision tree when feature is not in use 2024-01-08 17:59:19 +01:00
Ilya Averyanov
9e0f3ce53b feat(ds): restore original add_generation/update_db_config callback semantics 2023-12-29 13:12:15 +03:00
JimMoen
5e100f52b8
style: erlfmt all rebar.config files and bin/nodetool 2023-12-29 09:08:03 +08:00
Zaiming (Stone) Shi
23ded313ec chore: update app versions 2023-12-22 15:29:22 +01:00
Zaiming (Stone) Shi
20543d55ef chore: bump app vsn 2023-12-22 13:13:30 +01:00
Zaiming (Stone) Shi
322b7bb7d2 chore: bump app vsn 2023-12-22 13:00:37 +01:00