You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iggy.apache.org by gk...@apache.org on 2025/10/28 10:02:04 UTC
(iggy) branch io_uring_tpc_master_merge created (now 1cd3ae7f0)
This is an automated email from the ASF dual-hosted git repository.
gkoszyk pushed a change to branch io_uring_tpc_master_merge
in repository https://gitbox.apache.org/repos/asf/iggy.git
at 1cd3ae7f0 finish merging
This branch includes the following new commits:
new 98a9b11c0 Merge branch 'master' into io_uring_tpc_master_merge
new 1cd3ae7f0 finish merging
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(iggy) 02/02: finish merging
Posted by gk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
gkoszyk pushed a commit to branch io_uring_tpc_master_merge
in repository https://gitbox.apache.org/repos/asf/iggy.git
commit 1cd3ae7f09fb9331d6a7470ce1f5399e7245f387
Author: numminex <g....@gmail.com>
AuthorDate: Tue Oct 28 11:01:52 2025 +0100
finish merging
---
Cargo.lock | 977 ++++++++++-----------
Cargo.toml | 12 +-
core/ai/mcp/src/service/mod.rs | 9 +-
core/ai/mcp/src/service/requests.rs | 12 +-
.../types/configuration/websocket_config/mod.rs | 21 +
core/integration/Cargo.toml | 1 +
core/integration/src/lib.rs | 2 +
core/integration/src/test_server.rs | 9 +-
core/integration/tests/config_provider/mod.rs | 14 +-
core/integration/tests/connectors/mod.rs | 3 +-
core/server/Cargo.toml | 8 +-
.../create_consumer_group_handler.rs | 2 +-
.../delete_consumer_group_handler.rs | 2 +-
.../consumer_groups/join_consumer_group_handler.rs | 2 +-
.../leave_consumer_group_handler.rs | 2 +-
.../create_personal_access_token_handler.rs | 2 +-
.../delete_personal_access_token_handler.rs | 2 +-
.../get_personal_access_tokens_handler.rs | 4 +-
.../login_with_personal_access_token_handler.rs | 2 +-
.../handlers/segments/delete_segments_handler.rs | 2 +-
.../handlers/streams/create_stream_handler.rs | 6 +-
.../handlers/streams/delete_stream_handler.rs | 2 +-
.../binary/handlers/streams/get_stream_handler.rs | 4 +-
.../binary/handlers/streams/get_streams_handler.rs | 2 +-
.../handlers/streams/purge_stream_handler.rs | 2 +-
.../handlers/streams/update_stream_handler.rs | 2 +-
.../binary/handlers/system/get_clients_handler.rs | 4 +-
.../src/binary/handlers/system/get_me_handler.rs | 4 +-
.../binary/handlers/system/get_stats_handler.rs | 4 +-
.../binary/handlers/topics/create_topic_handler.rs | 6 +-
.../binary/handlers/topics/update_topic_handler.rs | 2 +-
.../handlers/users/change_password_handler.rs | 2 +-
.../binary/handlers/users/create_user_handler.rs | 8 +-
.../binary/handlers/users/delete_user_handler.rs | 2 +-
.../src/binary/handlers/users/get_users_handler.rs | 4 +-
.../binary/handlers/users/login_user_handler.rs | 2 +-
.../binary/handlers/users/logout_user_handler.rs | 2 +-
.../handlers/users/update_permissions_handler.rs | 2 +-
.../binary/handlers/users/update_user_handler.rs | 2 +-
core/server/src/bootstrap.rs | 8 +-
core/server/src/configs/config_provider.rs | 442 ++++++++++
core/server/src/configs/defaults.rs | 2 -
core/server/src/configs/server.rs | 88 +-
core/server/src/configs/validators.rs | 11 +-
core/server/src/http/consumer_groups.rs | 4 +-
core/server/src/http/messages.rs | 6 +-
core/server/src/http/partitions.rs | 10 +-
core/server/src/http/personal_access_tokens.rs | 14 +-
core/server/src/http/streams.rs | 18 +-
core/server/src/http/system.rs | 30 +-
core/server/src/http/topics.rs | 24 +-
core/server/src/http/users.rs | 36 +-
core/server/src/main.rs | 10 +-
core/server/src/quic/quic_sender.rs | 2 +-
core/server/src/quic/quic_server.rs | 4 +-
core/server/src/server_error.rs | 2 +-
core/server/src/shard/system/clients.rs | 2 +-
core/server/src/shard/system/consumer_groups.rs | 16 +-
core/server/src/shard/system/consumer_offsets.rs | 12 +-
core/server/src/shard/system/messages.rs | 8 +-
core/server/src/shard/system/partitions.rs | 4 +-
.../src/shard/system/personal_access_tokens.rs | 4 +-
core/server/src/shard/system/storage.rs | 4 +-
core/server/src/shard/system/streams.rs | 8 +-
core/server/src/shard/system/topics.rs | 10 +-
core/server/src/shard/system/users.rs | 36 +-
.../src/shard/tasks/oneshot/config_writer.rs | 14 +-
core/server/src/shard/transmission/id.rs | 24 -
core/server/src/slab/streams.rs | 14 +-
core/server/src/state/file.rs | 6 +-
core/server/src/state/system.rs | 14 +-
core/server/src/streaming/partitions/helpers.rs | 10 +-
core/server/src/streaming/partitions/segments.rs | 2 +-
core/server/src/streaming/partitions/storage.rs | 6 +-
core/server/src/streaming/persistence/persister.rs | 10 +-
.../src/streaming/segments/indexes/index_reader.rs | 2 +-
.../src/streaming/segments/indexes/index_writer.rs | 4 +-
.../streaming/segments/messages/messages_reader.rs | 6 +-
.../streaming/segments/messages/messages_writer.rs | 10 +-
core/server/src/tcp/tcp_listener.rs | 4 +-
core/server/src/tcp/tcp_sender.rs | 2 +-
core/server/src/tcp/tcp_tls_listener.rs | 4 +-
core/server/src/tcp/tcp_tls_sender.rs | 18 +-
core/server/src/websocket/websocket_listener.rs | 6 +-
.../server/src/websocket/websocket_tls_listener.rs | 6 +-
85 files changed, 1182 insertions(+), 945 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
index ab94339e0..9df42cb0b 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -8,7 +8,6 @@ version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f7b0a21988c1bf877cf4759ef5ddaac04c1c9fe808c9142ecb78ba97d97a28a"
dependencies = [
- "bitflags 2.9.4",
"bitflags 2.10.0",
"bytes",
"futures-core",
@@ -45,7 +44,6 @@ dependencies = [
"actix-service",
"actix-utils",
"actix-web",
- "bitflags 2.9.4",
"bitflags 2.10.0",
"bytes",
"derive_more 2.0.1",
@@ -70,14 +68,14 @@ dependencies = [
"actix-service",
"actix-utils",
"base64 0.22.1",
- "bitflags 2.9.4",
+ "bitflags 2.10.0",
"brotli",
"bytes",
"bytestring",
"derive_more 2.0.1",
"encoding_rs",
"flate2",
- "foldhash 0.1.5",
+ "foldhash",
"futures-core",
"h2 0.3.27",
"http 0.2.12",
@@ -105,7 +103,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb"
dependencies = [
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -191,7 +189,7 @@ dependencies = [
"cookie",
"derive_more 2.0.1",
"encoding_rs",
- "foldhash 0.1.5",
+ "foldhash",
"futures-core",
"futures-util",
"impl-more",
@@ -222,7 +220,7 @@ dependencies = [
"actix-router",
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -425,18 +423,6 @@ dependencies = [
"password-hash",
]
-[[package]]
-name = "arraydeque"
-version = "0.5.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c3610892ee6e0cbce8ae2700349fcf8f98adb0dbfbee85aec3c9179d29cc072"
-dependencies = [
- "base64ct",
- "blake2",
- "cpufeatures",
- "password-hash",
-]
-
[[package]]
name = "arrayref"
version = "0.3.9"
@@ -465,6 +451,22 @@ dependencies = [
"wait-timeout",
]
+[[package]]
+name = "astral-tokio-tar"
+version = "0.5.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec179a06c1769b1e42e1e2cbe74c7dcdb3d6383c838454d063eaac5bbb7ebbe5"
+dependencies = [
+ "filetime",
+ "futures-core",
+ "libc",
+ "portable-atomic",
+ "rustc-hash",
+ "tokio",
+ "tokio-stream",
+ "xattr",
+]
+
[[package]]
name = "async-broadcast"
version = "0.7.2"
@@ -524,7 +526,7 @@ dependencies = [
"async-trait",
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
"tokio",
]
@@ -582,7 +584,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -599,7 +601,7 @@ checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -613,15 +615,8 @@ dependencies = [
"futures-lite",
"pin-project",
"thiserror 2.0.17",
-]
-
-[[package]]
-name = "atoi"
-version = "2.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528"
-dependencies = [
- "num-traits",
+ "tokio",
+ "tokio-util",
]
[[package]]
@@ -794,7 +789,7 @@ checksum = "604fde5e028fea851ce1d8570bbdc034bec850d157f7569d10f347d06808c05c"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -951,7 +946,7 @@ version = "0.72.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895"
dependencies = [
- "bitflags 2.9.4",
+ "bitflags 2.10.0",
"cexpr",
"clang-sys",
"itertools 0.13.0",
@@ -962,7 +957,7 @@ dependencies = [
"regex",
"rustc-hash",
"shlex",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -973,9 +968,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bitflags"
-version = "2.9.4"
+version = "2.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394"
+checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3"
dependencies = [
"serde_core",
]
@@ -1023,6 +1018,83 @@ dependencies = [
"generic-array",
]
+[[package]]
+name = "bollard"
+version = "0.19.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec7646ee90964aa59e9f832a67182791396a19a5b1d76eb17599a8310a7e2e09"
+dependencies = [
+ "async-stream",
+ "base64 0.22.1",
+ "bitflags 2.10.0",
+ "bollard-buildkit-proto",
+ "bollard-stubs",
+ "bytes",
+ "chrono",
+ "futures-core",
+ "futures-util",
+ "hex",
+ "home",
+ "http 1.3.1",
+ "http-body-util",
+ "hyper",
+ "hyper-named-pipe",
+ "hyper-rustls",
+ "hyper-util",
+ "hyperlocal",
+ "log",
+ "num",
+ "pin-project-lite",
+ "rand 0.9.2",
+ "rustls",
+ "rustls-native-certs",
+ "rustls-pemfile",
+ "rustls-pki-types",
+ "serde",
+ "serde_derive",
+ "serde_json",
+ "serde_repr",
+ "serde_urlencoded",
+ "thiserror 2.0.17",
+ "tokio",
+ "tokio-stream",
+ "tokio-util",
+ "tonic 0.14.2",
+ "tower-service",
+ "url",
+ "winapi",
+]
+
+[[package]]
+name = "bollard-buildkit-proto"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85a885520bf6249ab931a764ffdb87b0ceef48e6e7d807cfdb21b751e086e1ad"
+dependencies = [
+ "prost 0.14.1",
+ "prost-types 0.14.1",
+ "tonic 0.14.2",
+ "tonic-prost",
+ "ureq",
+]
+
+[[package]]
+name = "bollard-stubs"
+version = "1.49.1-rc.28.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5731fe885755e92beff1950774068e0cae67ea6ec7587381536fca84f1779623"
+dependencies = [
+ "base64 0.22.1",
+ "bollard-buildkit-proto",
+ "bytes",
+ "chrono",
+ "prost 0.14.1",
+ "serde",
+ "serde_json",
+ "serde_repr",
+ "serde_with",
+]
+
[[package]]
name = "bon"
version = "3.8.1"
@@ -1045,7 +1117,7 @@ dependencies = [
"proc-macro2",
"quote",
"rustversion",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -1074,7 +1146,7 @@ dependencies = [
"proc-macro-crate 3.4.0",
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -1100,9 +1172,9 @@ dependencies = [
[[package]]
name = "bstr"
-version = "1.12.0"
+version = "1.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4"
+checksum = "63044e1ae8e69f3b5a92c736ca6269b8d12fa7efe39bf34ddb06d102cf0e2cab"
dependencies = [
"memchr",
"regex-automata",
@@ -1224,9 +1296,9 @@ dependencies = [
[[package]]
name = "cc"
-version = "1.2.41"
+version = "1.2.43"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ac9fe6cdbb24b6ade63616c0a0688e45bb56732262c158df3c0c4bea4ca47cb7"
+checksum = "739eb0f94557554b3ca9a86d2d37bebd49c5e6d0c1d2bda35ba5bdac830befc2"
dependencies = [
"find-msvc-tools",
"jobserver",
@@ -1286,7 +1358,7 @@ checksum = "5ec2398273c047c67d69794a924b1a2a5c14a5fab6bcbe8b24e86a0df9328e5e"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -1326,9 +1398,9 @@ dependencies = [
[[package]]
name = "clap"
-version = "4.5.49"
+version = "4.5.50"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f4512b90fa68d3a9932cea5184017c5d200f5921df706d45e853537dea51508f"
+checksum = "0c2cfd7bf8a6017ddaa4e32ffe7403d547790db06bd171c1c53926faab501623"
dependencies = [
"clap_builder",
"clap_derive",
@@ -1336,9 +1408,9 @@ dependencies = [
[[package]]
name = "clap_builder"
-version = "4.5.49"
+version = "4.5.50"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0025e98baa12e766c67ba13ff4695a887a1eba19569aad00a472546795bd6730"
+checksum = "0a4c05b9e80c5ccd3a7ef080ad7b6ba7d6fc00a985b8b157197075677c82c7a0"
dependencies = [
"anstream",
"anstyle",
@@ -1365,7 +1437,7 @@ dependencies = [
"heck 0.5.0",
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -1531,7 +1603,7 @@ dependencies = [
"proc-macro-crate 3.4.0",
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -1650,26 +1722,6 @@ dependencies = [
"crossbeam-utils",
]
-[[package]]
-name = "config"
-version = "0.15.18"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "180e549344080374f9b32ed41bf3b6b57885ff6a289367b3dbc10eea8acc1918"
-dependencies = [
- "async-trait",
- "convert_case 0.6.0",
- "json5",
- "pathdiff",
- "ron",
- "rust-ini",
- "serde-untagged",
- "serde_core",
- "serde_json",
- "toml 0.9.8",
- "winnow 0.7.13",
- "yaml-rust2",
-]
-
[[package]]
name = "console"
version = "0.15.11"
@@ -1738,26 +1790,6 @@ version = "0.9.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8"
-[[package]]
-name = "const-random"
-version = "0.1.18"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359"
-dependencies = [
- "const-random-macro",
-]
-
-[[package]]
-name = "const-random-macro"
-version = "0.1.16"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e"
-dependencies = [
- "getrandom 0.2.16",
- "once_cell",
- "tiny-keccak",
-]
-
[[package]]
name = "constant_time_eq"
version = "0.3.1"
@@ -1931,7 +1963,7 @@ version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8b9f2e4c67f833b660cdb0a3523065869fb35570177239812ed4c905aeff87b"
dependencies = [
- "bitflags 2.9.4",
+ "bitflags 2.10.0",
"crossterm_winapi",
"document-features",
"parking_lot 0.12.5",
@@ -1948,12 +1980,6 @@ dependencies = [
"winapi",
]
-[[package]]
-name = "crunchy"
-version = "0.2.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5"
-
[[package]]
name = "crypto-common"
version = "0.1.6"
@@ -1967,9 +1993,9 @@ dependencies = [
[[package]]
name = "ctor"
-version = "0.5.0"
+version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "67773048316103656a637612c4a62477603b777d91d9c62ff2290f9cde178fdb"
+checksum = "59c9b8bdf64ee849747c1b12eb861d21aa47fa161564f48332f1afe2373bf899"
dependencies = [
"ctor-proc-macro",
"dtor",
@@ -1977,9 +2003,9 @@ dependencies = [
[[package]]
name = "ctor-proc-macro"
-version = "0.0.6"
+version = "0.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e2931af7e13dc045d8e9d26afccc6fa115d64e115c9c84b1166288b46f6782c2"
+checksum = "52560adf09603e58c9a7ee1fe1dcb95a16927b17c127f0ac02d6e768a0e25bc1"
[[package]]
name = "ctr"
@@ -2042,7 +2068,7 @@ dependencies = [
"proc-macro2",
"quote",
"regex",
- "syn 2.0.106",
+ "syn 2.0.108",
"synthez",
]
@@ -2150,7 +2176,7 @@ dependencies = [
"proc-macro2",
"quote",
"strsim",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -2164,7 +2190,7 @@ dependencies = [
"proc-macro2",
"quote",
"strsim",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -2175,7 +2201,7 @@ checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead"
dependencies = [
"darling_core 0.20.11",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -2186,7 +2212,7 @@ checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81"
dependencies = [
"darling_core 0.21.3",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -2250,9 +2276,9 @@ dependencies = [
[[package]]
name = "deranged"
-version = "0.5.4"
+version = "0.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a41953f86f8a05768a6cda24def994fd2f424b04ec5c719cf89989779f199071"
+checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587"
dependencies = [
"powerfmt",
"serde_core",
@@ -2266,7 +2292,7 @@ checksum = "2cdc8d50f426189eef89dac62fabfa0abb27d5cc008f25bf4156a0203325becc"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -2277,7 +2303,7 @@ checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -2298,7 +2324,7 @@ dependencies = [
"darling 0.20.11",
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -2308,7 +2334,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c"
dependencies = [
"derive_builder_core",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -2319,7 +2345,7 @@ checksum = "6edb4b64a43d977b8e99788fe3a04d483834fba1215a7e02caa415b626497f7f"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -2340,7 +2366,7 @@ dependencies = [
"convert_case 0.7.1",
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
"unicode-xid",
]
@@ -2408,7 +2434,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -2431,16 +2457,7 @@ checksum = "788160fb30de9cdd857af31c6a2675904b16ece8fc2737b2c7127ba368c9d0f4"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
-]
-
-[[package]]
-name = "dlv-list"
-version = "0.5.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "442039f5147480ba31067cb00ada1adae6892028e40e45fc5de7b7df6dcc1b5f"
-dependencies = [
- "const-random",
+ "syn 2.0.108",
]
[[package]]
@@ -2469,15 +2486,6 @@ dependencies = [
"litrs",
]
-[[package]]
-name = "document-features"
-version = "0.2.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "95249b50c6c185bee49034bcb378a49dc2b5dff0be90ff6616d31d64febab05d"
-dependencies = [
- "litrs",
-]
-
[[package]]
name = "dotenvy"
version = "0.15.7"
@@ -2574,7 +2582,7 @@ dependencies = [
"once_cell",
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -2606,17 +2614,6 @@ version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
-[[package]]
-name = "erased-serde"
-version = "0.4.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "259d404d09818dec19332e31d94558aeb442fea04c817006456c24b5460bbd4b"
-dependencies = [
- "serde",
- "serde_core",
- "typeid",
-]
-
[[package]]
name = "err_trail"
version = "0.9.0"
@@ -2651,7 +2648,7 @@ dependencies = [
"proc-macro2",
"quote",
"regex",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -2665,6 +2662,17 @@ dependencies = [
"windows-sys 0.48.0",
]
+[[package]]
+name = "etcetera"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26c7b13d0780cb82722fd59f6f57f925e143427e4a75313a6c77243bf5326ae6"
+dependencies = [
+ "cfg-if",
+ "home",
+ "windows-sys 0.59.0",
+]
+
[[package]]
name = "event-listener"
version = "5.4.1"
@@ -2739,22 +2747,6 @@ version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"
-[[package]]
-name = "ff"
-version = "0.13.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393"
-dependencies = [
- "rand_core 0.6.4",
- "subtle",
-]
-
-[[package]]
-name = "fiat-crypto"
-version = "0.2.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d"
-
[[package]]
name = "figlet-rs"
version = "0.1.5"
@@ -2778,13 +2770,25 @@ dependencies = [
[[package]]
name = "file-operation"
-version = "0.8.4"
+version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "123d84838d0d708f7486c4c99ff04557b473987868cf50fc3cca7ac62713956c"
+checksum = "e820507a8045dbe4861c925a91ca6989cce6c7c09b4c3d90c4941df84ffc0aeb"
dependencies = [
"tokio",
]
+[[package]]
+name = "filetime"
+version = "0.2.26"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bc0505cd1b6fa6580283f6bdf70a73fcf4aba1184038c90902b92b3dd0df63ed"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "libredox",
+ "windows-sys 0.60.2",
+]
+
[[package]]
name = "find-msvc-tools"
version = "0.1.4"
@@ -2797,15 +2801,15 @@ version = "25.9.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09b6620799e7340ebd9968d2e0708eb82cf1971e9a16821e2091b6d6e475eed5"
dependencies = [
- "bitflags 2.9.4",
+ "bitflags 2.10.0",
"rustc_version",
]
[[package]]
name = "flate2"
-version = "1.1.4"
+version = "1.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dc5a4e564e38c699f2880d3fda590bedc2e69f3f84cd48b457bd892ce61d0aa9"
+checksum = "bfe33edd8e85a12a67454e37f8c75e730830d83e313556ab9ebf9ee7fbeb3bfb"
dependencies = [
"crc32fast",
"libz-rs-sys",
@@ -2845,12 +2849,6 @@ version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
-[[package]]
-name = "foldhash"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"
-
[[package]]
name = "foreign-types"
version = "0.3.2"
@@ -2992,7 +2990,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -3039,7 +3037,6 @@ checksum = "4bb6743198531e02858aeaea5398fcc883e71851fcbcb5a2f773e2fb6cb1edf2"
dependencies = [
"typenum",
"version_check",
- "zeroize",
]
[[package]]
@@ -3090,7 +3087,7 @@ dependencies = [
"quote",
"serde",
"serde_json",
- "syn 2.0.106",
+ "syn 2.0.108",
"textwrap",
"thiserror 1.0.69",
"typed-builder",
@@ -3102,7 +3099,7 @@ version = "0.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2deb07a133b1520dc1a5690e9bd08950108873d7ed5de38dcc74d3b5ebffa110"
dependencies = [
- "bitflags 2.9.4",
+ "bitflags 2.10.0",
"libc",
"libgit2-sys",
"log",
@@ -3117,9 +3114,9 @@ checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280"
[[package]]
name = "globset"
-version = "0.4.17"
+version = "0.4.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eab69130804d941f8075cfd713bf8848a2c3b3f201a9457a11e6f87e1ab62305"
+checksum = "52dfc19153a48bde0cbd630453615c8151bce3a5adfac7a0aebfbf0a1e1f57e3"
dependencies = [
"aho-corasick",
"bstr",
@@ -3134,7 +3131,7 @@ version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0bf760ebf69878d9fd8f110c89703d90ce35095324d1f1edcb595c63945ee757"
dependencies = [
- "bitflags 2.9.4",
+ "bitflags 2.10.0",
"ignore",
"walkdir",
]
@@ -3545,7 +3542,7 @@ dependencies = [
"proc-macro-crate 1.3.1",
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -3611,9 +3608,9 @@ dependencies = [
[[package]]
name = "halfbrown"
-version = "0.4.0"
+version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0c7ed2f2edad8a14c8186b847909a41fbb9c3eafa44f88bd891114ed5019da09"
+checksum = "aa2c385c6df70fd180bbb673d93039dbd2cd34e41d782600bdf6e1ca7bce39aa"
dependencies = [
"hashbrown 0.15.5",
"serde",
@@ -3673,18 +3670,7 @@ checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1"
dependencies = [
"allocator-api2",
"equivalent",
- "foldhash 0.1.5",
-]
-
-[[package]]
-name = "hashbrown"
-version = "0.16.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d"
-dependencies = [
- "allocator-api2",
- "equivalent",
- "foldhash 0.2.0",
+ "foldhash",
]
[[package]]
@@ -3960,6 +3946,21 @@ dependencies = [
"tracing",
]
+[[package]]
+name = "hyperlocal"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "986c5ce3b994526b3cd75578e62554abd09f0899d6206de48b3e96ab34ccc8c7"
+dependencies = [
+ "hex",
+ "http-body-util",
+ "hyper",
+ "hyper-util",
+ "pin-project-lite",
+ "tokio",
+ "tower-service",
+]
+
[[package]]
name = "iana-time-zone"
version = "0.1.64"
@@ -4216,6 +4217,7 @@ dependencies = [
"dlopen2",
"dotenvy",
"figlet-rs",
+ "figment",
"flume",
"futures",
"iggy",
@@ -4238,14 +4240,15 @@ dependencies = [
[[package]]
name = "iggy-mcp"
-version = "0.1.0"
+version = "0.1.1"
dependencies = [
"axum 0.8.6",
"axum-server",
- "config",
"dotenvy",
"figlet-rs",
+ "figment",
"iggy",
+ "iggy_common",
"rmcp",
"serde",
"serde_json",
@@ -4305,6 +4308,7 @@ dependencies = [
"strum",
"thiserror 2.0.17",
"tokio",
+ "toml 0.9.8",
"tracing",
]
@@ -4477,7 +4481,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "699c1b6d335e63d0ba5c1e1c7f647371ce989c3bcbe1f7ed2b85fa56e3bd1a21"
dependencies = [
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -4521,7 +4525,7 @@ version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f37dccff2791ab604f9babef0ba14fbe0be30bd368dc541e2b08d07c8aa908f3"
dependencies = [
- "bitflags 2.9.4",
+ "bitflags 2.10.0",
"inotify-sys",
"libc",
]
@@ -4609,7 +4613,7 @@ version = "0.7.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "046fa2d4d00aea763528b4950358d0ead425372445dc8ff86312b3c69ff7727b"
dependencies = [
- "bitflags 2.9.4",
+ "bitflags 2.10.0",
"cfg-if",
"libc",
]
@@ -4645,7 +4649,7 @@ dependencies = [
name = "is_terminal_polyfill"
version = "1.70.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
+checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
[[package]]
name = "itertools"
@@ -4692,7 +4696,7 @@ checksum = "03343451ff899767262ec32146f6d559dd759fdadf42ff0e227c7c48f72594b4"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -4729,9 +4733,9 @@ dependencies = [
[[package]]
name = "js-sys"
-version = "0.3.81"
+version = "0.3.82"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ec48937a97411dcb524a265206ccd4c90bb711fca92b2792c407f268825b9305"
+checksum = "b011eec8cc36da2aab2d5cff675ec18454fad408585853910a202391cf9f8e65"
dependencies = [
"once_cell",
"wasm-bindgen",
@@ -4752,29 +4756,6 @@ dependencies = [
"simple_asn1",
]
-[[package]]
-name = "jsonwebtoken"
-version = "10.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3d119c6924272d16f0ab9ce41f7aa0bfef9340c00b0bb7ca3dd3b263d4a9150b"
-dependencies = [
- "base64 0.22.1",
- "ed25519-dalek",
- "getrandom 0.2.16",
- "hmac",
- "js-sys",
- "p256",
- "p384",
- "pem",
- "rand 0.8.5",
- "rsa",
- "serde",
- "serde_json",
- "sha2",
- "signature",
- "simple_asn1",
-]
-
[[package]]
name = "jwalk"
version = "0.8.1"
@@ -4843,7 +4824,7 @@ dependencies = [
"proc-macro2",
"quote",
"regex",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -4966,7 +4947,7 @@ version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "416f7e718bdb06000964960ffa43b4335ad4012ae8b99060261aa4a8088d5ccb"
dependencies = [
- "bitflags 2.9.4",
+ "bitflags 2.10.0",
"libc",
"redox_syscall 0.5.18",
]
@@ -4981,16 +4962,6 @@ dependencies = [
"vcpkg",
]
-[[package]]
-name = "libsqlite3-sys"
-version = "0.30.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149"
-dependencies = [
- "pkg-config",
- "vcpkg",
-]
-
[[package]]
name = "libz-rs-sys"
version = "0.5.2"
@@ -5032,9 +5003,9 @@ checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956"
[[package]]
name = "litrs"
-version = "0.4.2"
+version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f5e54036fe321fd421e10d732f155734c4e4afd610dd556d9a82833ab3ee0bed"
+checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092"
[[package]]
name = "local-channel"
@@ -5090,7 +5061,7 @@ dependencies = [
"quote",
"regex-syntax 0.8.8",
"rustc_version",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -5190,7 +5161,7 @@ checksum = "db5b29714e950dbb20d5e6f74f9dcec4edbcc1067bb7f8ed198c097b8c1a818b"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -5269,7 +5240,7 @@ dependencies = [
"cfg-if",
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -5331,7 +5302,7 @@ version = "0.30.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6"
dependencies = [
- "bitflags 2.9.4",
+ "bitflags 2.10.0",
"cfg-if",
"cfg_aliases",
"libc",
@@ -5382,7 +5353,7 @@ version = "8.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4d3d07927151ff8575b7087f245456e549fea62edf0ec4e565a5ee50c8402bc3"
dependencies = [
- "bitflags 2.9.4",
+ "bitflags 2.10.0",
"fsevent-sys",
"inotify",
"kqueue",
@@ -5439,6 +5410,20 @@ dependencies = [
"windows-sys 0.61.2",
]
+[[package]]
+name = "num"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23"
+dependencies = [
+ "num-bigint",
+ "num-complex",
+ "num-integer",
+ "num-iter",
+ "num-rational",
+ "num-traits",
+]
+
[[package]]
name = "num-bigint"
version = "0.4.6"
@@ -5466,6 +5451,15 @@ dependencies = [
"zeroize",
]
+[[package]]
+name = "num-complex"
+version = "0.4.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495"
+dependencies = [
+ "num-traits",
+]
+
[[package]]
name = "num-conv"
version = "0.1.0"
@@ -5507,6 +5501,17 @@ dependencies = [
"num-modular",
]
+[[package]]
+name = "num-rational"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824"
+dependencies = [
+ "num-bigint",
+ "num-integer",
+ "num-traits",
+]
+
[[package]]
name = "num-traits"
version = "0.2.19"
@@ -5542,7 +5547,7 @@ version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536"
dependencies = [
- "bitflags 2.9.4",
+ "bitflags 2.10.0",
]
[[package]]
@@ -5557,9 +5562,9 @@ dependencies = [
[[package]]
name = "octocrab"
-version = "0.45.0"
+version = "0.47.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e9142159757f166a7b20e3dcd410a5af008a63747c73e836a01fa4f7af84d2c4"
+checksum = "0860f9250b6db66c5a4b46e00b381f063c58ad06a90f95f9ef701dd8679bb2c6"
dependencies = [
"arc-swap",
"async-trait",
@@ -5577,7 +5582,7 @@ dependencies = [
"hyper-rustls",
"hyper-timeout",
"hyper-util",
- "jsonwebtoken 9.3.1",
+ "jsonwebtoken",
"once_cell",
"percent-encoding",
"pin-project",
@@ -5619,7 +5624,7 @@ version = "0.10.74"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24ad14dd45412269e1a30f52ad8f0664f0f4f4a89ee8fe28c3b3527021ebb654"
dependencies = [
- "bitflags 2.9.4",
+ "bitflags 2.10.0",
"cfg-if",
"foreign-types",
"libc",
@@ -5636,7 +5641,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -5647,9 +5652,9 @@ checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e"
[[package]]
name = "openssl-src"
-version = "300.5.3+3.5.4"
+version = "300.5.4+3.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dc6bad8cd0233b63971e232cc9c5e83039375b8586d2312f31fda85db8f888c2"
+checksum = "a507b3792995dae9b0df8a1c1e3771e8418b7c2d9f0baeba32e6fe8b06c7cb72"
dependencies = [
"cc",
]
@@ -5718,7 +5723,7 @@ dependencies = [
"opentelemetry-http",
"opentelemetry-proto",
"opentelemetry_sdk",
- "prost 0.13.5",
+ "prost 0.14.1",
"reqwest",
"thiserror 2.0.17",
"tokio",
@@ -5734,8 +5739,9 @@ checksum = "a7175df06de5eaee9909d4805a3d07e28bb752c34cab57fa9cff549da596b30f"
dependencies = [
"opentelemetry",
"opentelemetry_sdk",
- "prost 0.13.5",
- "tonic 0.13.1",
+ "prost 0.14.1",
+ "tonic 0.14.2",
+ "tonic-prost",
]
[[package]]
@@ -5756,8 +5762,8 @@ dependencies = [
"opentelemetry",
"percent-encoding",
"rand 0.9.2",
- "serde_json",
"thiserror 2.0.17",
+ "tokio",
]
[[package]]
@@ -5766,16 +5772,6 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
-[[package]]
-name = "ordered-multimap"
-version = "0.7.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "49203cdcae0030493bad186b28da2fa25645fa276a51b6fec8010d281e02ef79"
-dependencies = [
- "dlv-list",
- "hashbrown 0.14.5",
-]
-
[[package]]
name = "os_pipe"
version = "1.2.3"
@@ -5850,6 +5846,31 @@ dependencies = [
"windows-link 0.2.1",
]
+[[package]]
+name = "parse-display"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "914a1c2265c98e2446911282c6ac86d8524f495792c38c5bd884f80499c7538a"
+dependencies = [
+ "parse-display-derive",
+ "regex",
+ "regex-syntax 0.8.8",
+]
+
+[[package]]
+name = "parse-display-derive"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2ae7800a4c974efd12df917266338e79a7a74415173caf7e70aa0a0707345281"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "regex",
+ "regex-syntax 0.8.8",
+ "structmeta",
+ "syn 2.0.108",
+]
+
[[package]]
name = "passterm"
version = "2.0.1"
@@ -5907,7 +5928,7 @@ dependencies = [
"proc-macro2",
"proc-macro2-diagnostics",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -5992,7 +6013,7 @@ dependencies = [
"pest_meta",
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -6022,7 +6043,7 @@ checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -6202,7 +6223,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b"
dependencies = [
"proc-macro2",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -6250,9 +6271,9 @@ dependencies = [
[[package]]
name = "proc-macro2"
-version = "1.0.101"
+version = "1.0.103"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de"
+checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8"
dependencies = [
"unicode-ident",
]
@@ -6265,7 +6286,7 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
"version_check",
"yansi",
]
@@ -6307,7 +6328,7 @@ checksum = "9adf1691c04c0a5ff46ff8f262b58beb07b0dbb61f96f9f54f6cbd82106ed87f"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -6340,7 +6361,7 @@ dependencies = [
"itertools 0.14.0",
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -6353,7 +6374,7 @@ dependencies = [
"itertools 0.14.0",
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -6601,7 +6622,7 @@ version = "11.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "498cd0dc59d73224351ee52a95fee0f1a617a2eae0e7d9d720cc622c73a54186"
dependencies = [
- "bitflags 2.9.4",
+ "bitflags 2.10.0",
]
[[package]]
@@ -6652,7 +6673,7 @@ version = "0.5.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d"
dependencies = [
- "bitflags 2.9.4",
+ "bitflags 2.10.0",
]
[[package]]
@@ -6683,7 +6704,7 @@ checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -6824,16 +6845,6 @@ dependencies = [
"rand 0.8.5",
]
-[[package]]
-name = "rfc6979"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2"
-dependencies = [
- "hmac",
- "subtle",
-]
-
[[package]]
name = "ring"
version = "0.17.14"
@@ -6885,9 +6896,9 @@ dependencies = [
[[package]]
name = "rmcp"
-version = "0.6.4"
+version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "41ab0892f4938752b34ae47cb53910b1b0921e55e77ddb6e44df666cab17939f"
+checksum = "1fdad1258f7259fdc0f2dfc266939c82c3b5d1fd72bcde274d600cdc27e60243"
dependencies = [
"axum 0.8.6",
"base64 0.22.1",
@@ -6915,39 +6926,6 @@ dependencies = [
"uuid",
]
-[[package]]
-name = "rmcp-macros"
-version = "0.6.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1827cd98dab34cade0513243c6fe0351f0f0b2c9d6825460bcf45b42804bdda0"
-dependencies = [
- "darling 0.21.3",
- "proc-macro2",
- "quote",
- "serde_json",
- "syn 2.0.106",
-]
-
-[[package]]
-name = "ron"
-version = "0.8.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1fdad1258f7259fdc0f2dfc266939c82c3b5d1fd72bcde274d600cdc27e60243"
-dependencies = [
- "base64 0.21.7",
- "bitflags 2.9.4",
- "serde",
- "serde_json",
- "sse-stream",
- "thiserror 2.0.17",
- "tokio",
- "tokio-stream",
- "tokio-util",
- "tower-service",
- "tracing",
- "uuid",
-]
-
[[package]]
name = "rmcp-macros"
version = "0.8.3"
@@ -6987,16 +6965,6 @@ dependencies = [
"zeroize",
]
-[[package]]
-name = "rust-ini"
-version = "0.21.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "796e8d2b6696392a43bea58116b667fb4c29727dc5abd27d6acf338bb4f688c7"
-dependencies = [
- "cfg-if",
- "ordered-multimap",
-]
-
[[package]]
name = "rust_decimal"
version = "1.39.0"
@@ -7034,7 +7002,7 @@ version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e"
dependencies = [
- "bitflags 2.9.4",
+ "bitflags 2.10.0",
"errno",
"libc",
"linux-raw-sys",
@@ -7043,9 +7011,9 @@ dependencies = [
[[package]]
name = "rustls"
-version = "0.23.33"
+version = "0.23.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "751e04a496ca00bb97a5e043158d23d66b5aabf2e1d5aa2a0aaebb1aafe6f82c"
+checksum = "6a9586e9ee2b4f8fab52a0048ca7334d7024eef48e2cb9407e3497bb7cab7fa7"
dependencies = [
"aws-lc-rs",
"log",
@@ -7080,9 +7048,9 @@ dependencies = [
[[package]]
name = "rustls-pki-types"
-version = "1.12.0"
+version = "1.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79"
+checksum = "94182ad936a0c91c324cd46c6511b9510ed16af436d7b5bab34beab0afd55f7a"
dependencies = [
"web-time",
"zeroize",
@@ -7090,9 +7058,9 @@ dependencies = [
[[package]]
name = "rustls-platform-verifier"
-version = "0.6.1"
+version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "be59af91596cac372a6942530653ad0c3a246cdd491aaa9dcaee47f88d67d5a0"
+checksum = "1d99feebc72bae7ab76ba994bb5e121b8d83d910ca40b36e0921f53becc41784"
dependencies = [
"core-foundation 0.10.1",
"core-foundation-sys",
@@ -7106,7 +7074,7 @@ dependencies = [
"security-framework 3.5.1",
"security-framework-sys",
"webpki-root-certs",
- "windows-sys 0.59.0",
+ "windows-sys 0.61.2",
]
[[package]]
@@ -7220,34 +7188,14 @@ dependencies = [
"proc-macro2",
"quote",
"serde_derive_internals",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
name = "scoped-tls"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "82d20c4491bc164fa2f6c5d44565947a52ad80b9505d8e36f8d54c27c739fcd0"
-dependencies = [
- "chrono",
- "dyn-clone",
- "ref-cast",
- "schemars_derive",
- "serde",
- "serde_json",
-]
-
-[[package]]
-name = "schemars_derive"
-version = "1.0.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "33d020396d1d138dc19f1165df7545479dcd58d93810dc5d646a16e55abefa80"
-dependencies = [
- "proc-macro2",
- "quote",
- "serde_derive_internals",
- "syn 2.0.108",
-]
+checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294"
[[package]]
name = "scopeguard"
@@ -7276,7 +7224,7 @@ dependencies = [
"heck 0.4.1",
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -7294,7 +7242,7 @@ version = "2.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02"
dependencies = [
- "bitflags 2.9.4",
+ "bitflags 2.10.0",
"core-foundation 0.9.4",
"core-foundation-sys",
"libc",
@@ -7307,7 +7255,7 @@ version = "3.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b3297343eaf830f66ede390ea39da1d462b6b0c1b000f420d0a83f898bbbe6ef"
dependencies = [
- "bitflags 2.9.4",
+ "bitflags 2.10.0",
"core-foundation 0.10.1",
"core-foundation-sys",
"libc",
@@ -7363,18 +7311,6 @@ dependencies = [
"serde_derive",
]
-[[package]]
-name = "serde-untagged"
-version = "0.1.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f9faf48a4a2d2693be24c6289dbe26552776eb7737074e6722891fadbe6c5058"
-dependencies = [
- "erased-serde",
- "serde",
- "serde_core",
- "typeid",
-]
-
[[package]]
name = "serde-wasm-bindgen"
version = "0.5.0"
@@ -7414,7 +7350,7 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -7425,7 +7361,7 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -7452,6 +7388,17 @@ dependencies = [
"serde_core",
]
+[[package]]
+name = "serde_repr"
+version = "0.1.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.108",
+]
+
[[package]]
name = "serde_spanned"
version = "0.6.9"
@@ -7484,9 +7431,9 @@ dependencies = [
[[package]]
name = "serde_with"
-version = "3.15.0"
+version = "3.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6093cd8c01b25262b84927e0f7151692158fab02d961e04c979d3903eba7ecc5"
+checksum = "aa66c845eee442168b2c8134fec70ac50dc20e760769c8ba0ad1319ca1959b04"
dependencies = [
"base64 0.22.1",
"chrono",
@@ -7503,14 +7450,14 @@ dependencies = [
[[package]]
name = "serde_with_macros"
-version = "3.15.0"
+version = "3.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a7e6c180db0816026a61afa1cff5344fb7ebded7e4d3062772179f2501481c27"
+checksum = "b91a903660542fced4e99881aa481bdbaec1634568ee02e0b8bd57c64cb38955"
dependencies = [
"darling 0.21.3",
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -7548,7 +7495,7 @@ checksum = "5d69265a08751de7844521fd15003ae0a888e035773ba05695c5c759a6f89eef"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -7592,7 +7539,7 @@ dependencies = [
"hash32 1.0.0",
"human-repr",
"iggy_common",
- "jsonwebtoken 10.1.0",
+ "jsonwebtoken",
"lending-iterator",
"mimalloc",
"moka",
@@ -7702,9 +7649,9 @@ checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
[[package]]
name = "simd-json"
-version = "0.17.0"
+version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4255126f310d2ba20048db6321c81ab376f6a6735608bf11f0785c41f01f64e3"
+checksum = "c962f626b54771990066e5435ec8331d1462576cd2d1e62f24076ae014f92112"
dependencies = [
"getrandom 0.3.4",
"halfbrown",
@@ -7762,7 +7709,7 @@ checksum = "0eb01866308440fc64d6c44d9e86c5cc17adfe33c4d6eed55da9145044d0ffc1"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -7789,7 +7736,7 @@ dependencies = [
"heck 0.5.0",
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -7901,7 +7848,7 @@ dependencies = [
"quote",
"sqlx-core",
"sqlx-macros-core",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -7924,7 +7871,7 @@ dependencies = [
"sqlx-mysql",
"sqlx-postgres",
"sqlx-sqlite",
- "syn 2.0.106",
+ "syn 2.0.108",
"tokio",
"url",
]
@@ -7937,7 +7884,7 @@ checksum = "aa003f0038df784eb8fecbbac13affe3da23b45194bd57dba231c8f48199c526"
dependencies = [
"atoi",
"base64 0.22.1",
- "bitflags 2.9.4",
+ "bitflags 2.10.0",
"byteorder",
"bytes",
"chrono",
@@ -7981,12 +7928,12 @@ checksum = "db58fcd5a53cf07c184b154801ff91347e4c30d17a3562a635ff028ad5deda46"
dependencies = [
"atoi",
"base64 0.22.1",
- "bitflags 2.9.4",
+ "bitflags 2.10.0",
"byteorder",
"chrono",
"crc",
"dotenvy",
- "etcetera",
+ "etcetera 0.8.0",
"futures-channel",
"futures-core",
"futures-util",
@@ -8067,7 +8014,7 @@ dependencies = [
"proc-macro-error",
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
"toml 0.8.23",
]
@@ -8083,21 +8030,33 @@ dependencies = [
]
[[package]]
-name = "stringprep"
-version = "0.1.5"
+name = "strsim"
+version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1"
+checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
+
+[[package]]
+name = "structmeta"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2e1575d8d40908d70f6fd05537266b90ae71b15dbbe7a8b7dffa2b759306d329"
dependencies = [
- "unicode-bidi",
- "unicode-normalization",
- "unicode-properties",
+ "proc-macro2",
+ "quote",
+ "structmeta-derive",
+ "syn 2.0.108",
]
[[package]]
-name = "strsim"
-version = "0.11.1"
+name = "structmeta-derive"
+version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
+checksum = "152a0b65a590ff6c3da95cabe2353ee04e6167c896b28e3b14478c2636c922fc"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.108",
+]
[[package]]
name = "strum"
@@ -8117,7 +8076,7 @@ dependencies = [
"heck 0.5.0",
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -8139,9 +8098,9 @@ dependencies = [
[[package]]
name = "syn"
-version = "2.0.106"
+version = "2.0.108"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6"
+checksum = "da58917d35242480a05c2897064da0a80589a2a0476c9a3f2fdc83b53502e917"
dependencies = [
"proc-macro2",
"quote",
@@ -8165,7 +8124,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -8174,7 +8133,7 @@ version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a3d2c2202510a1e186e63e596d9318c91a8cbe85cd1a56a7be0c333e5f59ec8d"
dependencies = [
- "syn 2.0.106",
+ "syn 2.0.108",
"synthez-codegen",
"synthez-core",
]
@@ -8185,7 +8144,7 @@ version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f724aa6d44b7162f3158a57bccd871a77b39a4aef737e01bcdff41f4772c7746"
dependencies = [
- "syn 2.0.106",
+ "syn 2.0.108",
"synthez-core",
]
@@ -8198,7 +8157,7 @@ dependencies = [
"proc-macro2",
"quote",
"sealed",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -8287,7 +8246,7 @@ dependencies = [
"cfg-if",
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -8298,19 +8257,19 @@ checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
"test-case-core",
]
[[package]]
name = "testcontainers"
-version = "0.25.0"
+version = "0.25.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b92bce247dc9260a19808321e11b51ea6a0293d02b48ab1c6578960610cfa2a7"
+checksum = "3f3ac71069f20ecfa60c396316c283fbf35e6833a53dff551a31b5458da05edc"
dependencies = [
+ "astral-tokio-tar",
"async-trait",
"bollard",
- "bollard-stubs",
"bytes",
"docker_credential",
"either",
@@ -8326,7 +8285,6 @@ dependencies = [
"thiserror 2.0.17",
"tokio",
"tokio-stream",
- "tokio-tar",
"tokio-util",
"ulid",
"url",
@@ -8378,7 +8336,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -8389,7 +8347,7 @@ checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -8434,15 +8392,6 @@ dependencies = [
"time-core",
]
-[[package]]
-name = "tiny-keccak"
-version = "2.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237"
-dependencies = [
- "crunchy",
-]
-
[[package]]
name = "tinystr"
version = "0.8.1"
@@ -8494,7 +8443,7 @@ checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -8542,6 +8491,7 @@ checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5"
dependencies = [
"bytes",
"futures-core",
+ "futures-io",
"futures-sink",
"pin-project-lite",
"tokio",
@@ -8680,35 +8630,6 @@ dependencies = [
"tracing",
]
-[[package]]
-name = "tonic"
-version = "0.13.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7e581ba15a835f4d9ea06c55ab1bd4dce26fc53752c69a04aac00703bfb49ba9"
-dependencies = [
- "async-trait",
- "axum 0.8.6",
- "base64 0.22.1",
- "bytes",
- "h2 0.4.12",
- "http 1.3.1",
- "http-body",
- "http-body-util",
- "hyper",
- "hyper-timeout",
- "hyper-util",
- "percent-encoding",
- "pin-project",
- "prost 0.13.5",
- "socket2 0.5.10",
- "tokio",
- "tokio-stream",
- "tower 0.5.2",
- "tower-layer",
- "tower-service",
- "tracing",
-]
-
[[package]]
name = "tonic"
version = "0.14.2"
@@ -8716,8 +8637,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eb7613188ce9f7df5bfe185db26c5814347d110db17920415cf2fbcad85e7203"
dependencies = [
"async-trait",
+ "axum 0.8.6",
"base64 0.22.1",
"bytes",
+ "h2 0.4.12",
"http 1.3.1",
"http-body",
"http-body-util",
@@ -8726,7 +8649,8 @@ dependencies = [
"hyper-util",
"percent-encoding",
"pin-project",
- "prost 0.13.5",
+ "socket2 0.6.1",
+ "sync_wrapper",
"tokio",
"tokio-stream",
"tower 0.5.2",
@@ -8804,7 +8728,7 @@ version = "0.6.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2"
dependencies = [
- "bitflags 2.9.4",
+ "bitflags 2.10.0",
"bytes",
"futures-util",
"http 1.3.1",
@@ -8861,7 +8785,7 @@ checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -8928,7 +8852,7 @@ checksum = "70977707304198400eb4835a78f6a9f928bf41bba420deb8fdb175cd965d77a7"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -8982,15 +8906,9 @@ checksum = "29a3151c41d0b13e3d011f98adc24434560ef06673a155a6c7f66b9879eecce2"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
-[[package]]
-name = "typeid"
-version = "1.0.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c"
-
[[package]]
name = "typenum"
version = "1.19.0"
@@ -9036,9 +8954,9 @@ checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5"
[[package]]
name = "unicode-ident"
-version = "1.0.19"
+version = "1.0.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d"
+checksum = "462eeb75aeb73aea900253ce739c8e18a67423fadf006037cd3ff27e82748a06"
[[package]]
name = "unicode-linebreak"
@@ -9113,6 +9031,35 @@ version = "0.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d49784317cd0d1ee7ec5c716dd598ec5b4483ea832a2dced265471cc0f690ae"
+[[package]]
+name = "ureq"
+version = "3.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "99ba1025f18a4a3fc3e9b48c868e9beb4f24f4b4b1a325bada26bd4119f46537"
+dependencies = [
+ "base64 0.22.1",
+ "log",
+ "percent-encoding",
+ "rustls",
+ "rustls-pemfile",
+ "rustls-pki-types",
+ "ureq-proto",
+ "utf-8",
+ "webpki-roots 1.0.3",
+]
+
+[[package]]
+name = "ureq-proto"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "60b4531c118335662134346048ddb0e54cc86bd7e81866757873055f0e38f5d2"
+dependencies = [
+ "base64 0.22.1",
+ "http 1.3.1",
+ "httparse",
+ "log",
+]
+
[[package]]
name = "url"
version = "2.5.7"
@@ -9183,9 +9130,9 @@ checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65"
[[package]]
name = "value-trait"
-version = "0.12.1"
+version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e80f0c733af0720a501b3905d22e2f97662d8eacfe082a75ed7ffb5ab08cb59"
+checksum = "0508fce11ad19e0aab49ce20b6bec7f8f82902ded31df1c9fc61b90f0eb396b8"
dependencies = [
"float-cmp",
"halfbrown",
@@ -9305,9 +9252,9 @@ checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b"
[[package]]
name = "wasm-bindgen"
-version = "0.2.104"
+version = "0.2.105"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c1da10c01ae9f1ae40cbfac0bac3b1e724b320abfcf52229f80b547c0d250e2d"
+checksum = "da95793dfc411fbbd93f5be7715b0578ec61fe87cb1a42b12eb625caa5c5ea60"
dependencies = [
"cfg-if",
"once_cell",
@@ -9316,25 +9263,11 @@ dependencies = [
"wasm-bindgen-shared",
]
-[[package]]
-name = "wasm-bindgen-backend"
-version = "0.2.104"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "671c9a5a66f49d8a47345ab942e2cb93c7d1d0339065d4f8139c486121b43b19"
-dependencies = [
- "bumpalo",
- "log",
- "proc-macro2",
- "quote",
- "syn 2.0.106",
- "wasm-bindgen-shared",
-]
-
[[package]]
name = "wasm-bindgen-futures"
-version = "0.4.54"
+version = "0.4.55"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7e038d41e478cc73bae0ff9b36c60cff1c98b8f38f8d7e8061e79ee63608ac5c"
+checksum = "551f88106c6d5e7ccc7cd9a16f312dd3b5d36ea8b4954304657d5dfba115d4a0"
dependencies = [
"cfg-if",
"js-sys",
@@ -9345,9 +9278,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
-version = "0.2.104"
+version = "0.2.105"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ca60477e4c59f5f2986c50191cd972e3a50d8a95603bc9434501cf156a9a119"
+checksum = "04264334509e04a7bf8690f2384ef5265f05143a4bff3889ab7a3269adab59c2"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@@ -9355,22 +9288,22 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
-version = "0.2.104"
+version = "0.2.105"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9f07d2f20d4da7b26400c9f4a0511e6e0345b040694e8a75bd41d578fa4421d7"
+checksum = "420bc339d9f322e562942d52e115d57e950d12d88983a14c79b86859ee6c7ebc"
dependencies = [
+ "bumpalo",
"proc-macro2",
"quote",
- "syn 2.0.106",
- "wasm-bindgen-backend",
+ "syn 2.0.108",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-shared"
-version = "0.2.104"
+version = "0.2.105"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bad67dc8b2a1a6e5448428adec4c3e84c43e561d8c9ee8a9e5aabeb193ec41d1"
+checksum = "76f218a38c84bcb33c25ec7059b07847d465ce0e0a76b995e134a45adcb6af76"
dependencies = [
"unicode-ident",
]
@@ -9405,9 +9338,9 @@ dependencies = [
[[package]]
name = "web-sys"
-version = "0.3.81"
+version = "0.3.82"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9367c417a924a74cae129e6a2ae3b47fabb1f8995595ab474029da749a8be120"
+checksum = "3a1f95c0d03a47f4ae1f7a64643a6bb97465d9b740f0fa8f90ea33915c99a9a1"
dependencies = [
"js-sys",
"wasm-bindgen",
@@ -9587,7 +9520,7 @@ checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -9598,7 +9531,7 @@ checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -9609,7 +9542,7 @@ checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -9620,7 +9553,7 @@ checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -10036,10 +9969,10 @@ dependencies = [
]
[[package]]
-name = "yaml-rust2"
-version = "0.10.4"
+name = "xattr"
+version = "1.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2462ea039c445496d8793d052e13787f2b90e750b833afee748e601c17621ed9"
+checksum = "32e45ad4206f6d2479085147f02bc2ef834ac85886624a23575ae137c8aa8156"
dependencies = [
"libc",
"rustix",
@@ -10113,7 +10046,7 @@ dependencies = [
"proc-macro-error",
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -10143,7 +10076,7 @@ checksum = "42bfd190a07ca8cfde7cd4c52b3ac463803dc07323db8c34daa697e86365978c"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -10166,7 +10099,7 @@ checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
"synstructure",
]
@@ -10187,7 +10120,7 @@ checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -10207,7 +10140,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
"synstructure",
]
@@ -10228,7 +10161,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
@@ -10261,14 +10194,14 @@ checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.108",
]
[[package]]
name = "zip"
-version = "5.1.1"
+version = "6.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2f852905151ac8d4d06fdca66520a661c09730a74c6d4e2b0f27b436b382e532"
+checksum = "eb2a05c7c36fde6c09b08576c9f7fb4cda705990f73b58fe011abf7dfb24168b"
dependencies = [
"aes",
"arbitrary",
diff --git a/Cargo.toml b/Cargo.toml
index 247be4a56..c21d1c50e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -60,7 +60,7 @@ async_zip = { version = "0.0.18", features = [
"deflate",
"zstd",
] }
-axum = "0.8.6"
+axum = { version = "0.8.6", features = ["macros"] }
axum-server = { version = "0.7.2", features = ["tls-rustls"] }
base64 = "0.22.1"
bench-dashboard-frontend = { path = "core/bench/dashboard/frontend" }
@@ -115,23 +115,17 @@ mockall = "0.13.1"
nonzero_lit = "0.1.2"
once_cell = "1.21.3"
passterm = "=2.0.1"
+predicates = "3.1.3"
quinn = "0.11.8"
postcard = { version = "1.1.1", features = ["alloc"] }
rand = "0.9.1"
+regex = "1.12.2"
reqwest = { version = "0.12.20", default-features = false, features = [
"json",
"rustls-tls",
] }
reqwest-middleware = { version = "0.4.2", features = ["json"] }
reqwest-retry = "0.7.0"
-rust-s3 = { version = "0.37.0", default-features = false, features = [
- "tokio-rustls-tls",
- "tags",
-] }
-rustls = { version = "0.23.31", features = ["ring"] }
-serde = { version = "1.0.225", features = ["derive", "rc"] }
-serde_json = "1.0.145"
-serde_with = { version = "3.14.0", features = ["base64", "macros"] }
serde_yml = "0.0.12"
rust-s3 = { version = "0.37.0", default-features = false, features = [
"tokio-rustls-tls",
diff --git a/core/ai/mcp/src/service/mod.rs b/core/ai/mcp/src/service/mod.rs
index 24d28c0c0..166e839d0 100644
--- a/core/ai/mcp/src/service/mod.rs
+++ b/core/ai/mcp/src/service/mod.rs
@@ -79,10 +79,10 @@ impl IggyService {
#[tool(description = "Create stream")]
pub async fn create_stream(
&self,
- Parameters(CreateStream { name, stream_id }): Parameters<CreateStream>,
+ Parameters(CreateStream { name }): Parameters<CreateStream>,
) -> Result<CallToolResult, ErrorData> {
self.permissions.ensure_create()?;
- request(self.client.create_stream(&name, stream_id).await)
+ request(self.client.create_stream(&name).await)
}
#[tool(description = "Update stream")]
@@ -146,7 +146,6 @@ impl IggyService {
partitions_count,
compression_algorithm,
replication_factor,
- topic_id,
message_expiry,
max_size,
}): Parameters<CreateTopic>,
@@ -167,7 +166,6 @@ impl IggyService {
partitions_count,
compression_algorithm,
replication_factor,
- topic_id,
message_expiry,
max_size,
)
@@ -501,13 +499,12 @@ impl IggyService {
stream_id,
topic_id,
name,
- group_id,
}): Parameters<CreateConsumerGroup>,
) -> Result<CallToolResult, ErrorData> {
self.permissions.ensure_create()?;
request(
self.client
- .create_consumer_group(&id(&stream_id)?, &id(&topic_id)?, &name, group_id)
+ .create_consumer_group(&id(&stream_id)?, &id(&topic_id)?, &name)
.await,
)
}
diff --git a/core/ai/mcp/src/service/requests.rs b/core/ai/mcp/src/service/requests.rs
index 1a8aea5c1..a7cbfb05d 100644
--- a/core/ai/mcp/src/service/requests.rs
+++ b/core/ai/mcp/src/service/requests.rs
@@ -32,8 +32,6 @@ pub struct GetStream {
pub struct CreateStream {
#[schemars(description = "stream name (required, must be unique)")]
pub name: String,
- #[schemars(description = "stream identifier (numeric, optional)")]
- pub stream_id: Option<u32>,
}
#[derive(Debug, Deserialize, JsonSchema)]
@@ -88,9 +86,6 @@ pub struct CreateTopic {
#[schemars(description = "replication factor (optional, must be greater than 0)")]
pub replication_factor: Option<u8>,
- #[schemars(description = "topic identifier (numeric, optional)")]
- pub topic_id: Option<u32>,
-
#[schemars(description = "message expiry (optional)")]
pub message_expiry: Option<String>,
@@ -282,9 +277,6 @@ pub struct CreateConsumerGroup {
#[schemars(description = "consumer group name (required, must be unique)")]
pub name: String,
-
- #[schemars(description = "consumer group identifier (optional, number)")]
- pub group_id: Option<u32>,
}
#[derive(Debug, Deserialize, JsonSchema)]
@@ -419,7 +411,7 @@ pub struct Permissions {
pub global: Option<GlobalPermissions>,
#[schemars(description = "stream permissions (optional)")]
- pub streams: Option<HashMap<u32, StreamPermissions>>,
+ pub streams: Option<HashMap<usize, StreamPermissions>>,
}
#[derive(Debug, Deserialize, JsonSchema)]
@@ -476,7 +468,7 @@ pub struct StreamPermissions {
pub send_messages: Option<bool>,
#[schemars(description = "topics permissions (optional)")]
- pub topics: Option<HashMap<u32, TopicPermissions>>,
+ pub topics: Option<HashMap<usize, TopicPermissions>>,
}
#[derive(Debug, Deserialize, JsonSchema)]
diff --git a/core/common/src/types/configuration/websocket_config/mod.rs b/core/common/src/types/configuration/websocket_config/mod.rs
new file mode 100644
index 000000000..46de921e5
--- /dev/null
+++ b/core/common/src/types/configuration/websocket_config/mod.rs
@@ -0,0 +1,21 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+pub mod websocket_client_config;
+pub mod websocket_client_config_builder;
+pub mod websocket_client_reconnection_config;
+pub mod websocket_connection_string_options;
diff --git a/core/integration/Cargo.toml b/core/integration/Cargo.toml
index f3e681c84..bb3d00e7f 100644
--- a/core/integration/Cargo.toml
+++ b/core/integration/Cargo.toml
@@ -32,6 +32,7 @@ assert_cmd = "2.0.17"
async-trait = { workspace = true }
bytes = { workspace = true }
chrono = { workspace = true }
+compio = { workspace = true }
ctor = "0.6.0"
derive_more = { workspace = true }
env_logger = { workspace = true }
diff --git a/core/integration/src/lib.rs b/core/integration/src/lib.rs
index 699229f22..269698b2b 100644
--- a/core/integration/src/lib.rs
+++ b/core/integration/src/lib.rs
@@ -27,6 +27,8 @@ pub mod tcp_client;
#[allow(deprecated)]
pub mod websocket_client;
+#[allow(deprecated)]
+pub mod test_connectors_runtime;
#[allow(deprecated)]
pub mod test_mcp_server;
#[allow(deprecated)]
diff --git a/core/integration/src/test_server.rs b/core/integration/src/test_server.rs
index c1ebd0831..160094d26 100644
--- a/core/integration/src/test_server.rs
+++ b/core/integration/src/test_server.rs
@@ -338,11 +338,13 @@ impl TestServer {
fn wait_until_server_has_bound(&mut self) {
let config_path = format!("{}/runtime/current_config.toml", self.local_data_path);
+ let file_config_provider = FileConfigProvider::new(config_path.clone());
+
let max_attempts = (MAX_PORT_WAIT_DURATION_S * 1000) / SLEEP_INTERVAL_MS;
self.server_addrs.clear();
let config = block_on(async {
- let mut loaded_config: Option<ServerConfig> = None;
+ let mut loaded_config = None;
for _ in 0..max_attempts {
if !Path::new(&config_path).exists() {
@@ -354,10 +356,7 @@ impl TestServer {
sleep(Duration::from_millis(SLEEP_INTERVAL_MS));
continue;
}
- match ServerConfig::file_config_provider(config_path.clone())
- .load_config()
- .await
- {
+ match file_config_provider.load_config().await {
Ok(config) => {
// Verify config contains fresh addresses, not stale defaults
// Default ports: TCP=8090, HTTP=3000, QUIC=8080, WebSocket=8092
diff --git a/core/integration/tests/config_provider/mod.rs b/core/integration/tests/config_provider/mod.rs
index abb112f15..0f301b54f 100644
--- a/core/integration/tests/config_provider/mod.rs
+++ b/core/integration/tests/config_provider/mod.rs
@@ -16,25 +16,22 @@
* under the License.
*/
-use iggy_common::{ConfigProvider, ConfigurationError, FileConfigProvider};
use integration::file::{file_exists, get_root_path};
use serial_test::serial;
-use server::configs::server::{ServerConfig, ServerEnvProvider};
+use server::configs::config_provider::{ConfigProvider, FileConfigProvider};
use std::env;
async fn scenario_parsing_from_file(extension: &str) {
let mut config_path = get_root_path().join("../configs/server");
assert!(config_path.set_extension(extension), "Cannot set extension");
let config_path = config_path.as_path().display().to_string();
- let config_provider = get_file_config_provider();
+ let config_provider = FileConfigProvider::new(config_path.clone());
assert!(
file_exists(&config_path),
"Config file not found: {config_path}"
);
assert!(
- ConfigProvider::<ServerConfig>::load_config(config_provider)
- .await
- .is_ok(),
+ config_provider.load_config().await.is_ok(),
"ConfigProvider failed to parse config from {config_path}"
);
}
@@ -74,8 +71,9 @@ async fn validate_custom_env_provider() {
env::set_var("IGGY_SYSTEM_SEGMENT_MESSAGE_EXPIRY", "10s");
}
- let file_config_provider = get_file_config_provider();
- let config: ServerConfig = file_config_provider
+ let config_path = get_root_path().join("../configs/server.toml");
+ let file_config_provider = FileConfigProvider::new(config_path.as_path().display().to_string());
+ let config = file_config_provider
.load_config()
.await
.expect("Failed to load default server.toml config");
diff --git a/core/integration/tests/connectors/mod.rs b/core/integration/tests/connectors/mod.rs
index 2b02c10d2..23499a2ac 100644
--- a/core/integration/tests/connectors/mod.rs
+++ b/core/integration/tests/connectors/mod.rs
@@ -89,7 +89,7 @@ impl ConnectorsRuntime {
let client = self.create_client().await;
client
- .create_stream(&iggy_setup.stream, None)
+ .create_stream(&iggy_setup.stream)
.await
.expect("Failed to create stream");
let stream_id = iggy_setup
@@ -103,7 +103,6 @@ impl ConnectorsRuntime {
1,
CompressionAlgorithm::None,
None,
- None,
IggyExpiry::ServerDefault,
MaxTopicSize::ServerDefault,
)
diff --git a/core/server/Cargo.toml b/core/server/Cargo.toml
index b1ca3d829..f4c9ccb58 100644
--- a/core/server/Cargo.toml
+++ b/core/server/Cargo.toml
@@ -32,10 +32,6 @@ ignored = ["rusty-s3"]
name = "iggy-server"
path = "src/main.rs"
-[[bin]]
-name = "iggy-server"
-path = "src/main.rs"
-
[features]
default = ["mimalloc"]
disable-mimalloc = []
@@ -96,8 +92,8 @@ opentelemetry-otlp = { version = "0.31.0", features = [
"http-proto",
"reqwest-client",
] }
-opentelemetry-semantic-conventions = "0.30.0"
-opentelemetry_sdk = { version = "0.30.0", features = [
+opentelemetry-semantic-conventions = "0.31.0"
+opentelemetry_sdk = { version = "0.31.0", features = [
"logs",
"trace",
"experimental_async_runtime",
diff --git a/core/server/src/binary/handlers/consumer_groups/create_consumer_group_handler.rs b/core/server/src/binary/handlers/consumer_groups/create_consumer_group_handler.rs
index c53c34f9e..10da6aa60 100644
--- a/core/server/src/binary/handlers/consumer_groups/create_consumer_group_handler.rs
+++ b/core/server/src/binary/handlers/consumer_groups/create_consumer_group_handler.rs
@@ -28,7 +28,7 @@ use crate::state::command::EntryCommand;
use crate::state::models::CreateConsumerGroupWithId;
use crate::streaming::session::Session;
use anyhow::Result;
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::create_consumer_group::CreateConsumerGroup;
use iggy_common::{Identifier, IggyError};
use std::rc::Rc;
diff --git a/core/server/src/binary/handlers/consumer_groups/delete_consumer_group_handler.rs b/core/server/src/binary/handlers/consumer_groups/delete_consumer_group_handler.rs
index 17d002d3d..eda996c6e 100644
--- a/core/server/src/binary/handlers/consumer_groups/delete_consumer_group_handler.rs
+++ b/core/server/src/binary/handlers/consumer_groups/delete_consumer_group_handler.rs
@@ -46,7 +46,7 @@ impl ServerCommandHandler for DeleteConsumerGroup {
shard: &Rc<IggyShard>,
) -> Result<(), IggyError> {
debug!("session: {session}, command: {self}");
- let cg = shard.delete_consumer_group(session, &self.stream_id, &self.topic_id, &self.group_id).with_error_context(|error| {
+ let cg = shard.delete_consumer_group(session, &self.stream_id, &self.topic_id, &self.group_id).with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to delete consumer group with ID: {} for topic with ID: {} in stream with ID: {} for session: {}",
self.group_id, self.topic_id, self.stream_id, session
diff --git a/core/server/src/binary/handlers/consumer_groups/join_consumer_group_handler.rs b/core/server/src/binary/handlers/consumer_groups/join_consumer_group_handler.rs
index a018a9c3f..15578f492 100644
--- a/core/server/src/binary/handlers/consumer_groups/join_consumer_group_handler.rs
+++ b/core/server/src/binary/handlers/consumer_groups/join_consumer_group_handler.rs
@@ -50,7 +50,7 @@ impl ServerCommandHandler for JoinConsumerGroup {
&self.topic_id,
&self.group_id,
)
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to join consumer group for stream_id: {}, topic_id: {}, group_id: {}, session: {}",
self.stream_id, self.topic_id, self.group_id, session
diff --git a/core/server/src/binary/handlers/consumer_groups/leave_consumer_group_handler.rs b/core/server/src/binary/handlers/consumer_groups/leave_consumer_group_handler.rs
index e482627dd..b439a66f3 100644
--- a/core/server/src/binary/handlers/consumer_groups/leave_consumer_group_handler.rs
+++ b/core/server/src/binary/handlers/consumer_groups/leave_consumer_group_handler.rs
@@ -52,7 +52,7 @@ impl ServerCommandHandler for LeaveConsumerGroup {
&self.topic_id,
&self.group_id,
)
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to leave consumer group for stream_id: {}, topic_id: {}, group_id: {}, session: {}",
self.stream_id, self.topic_id, self.group_id, session
diff --git a/core/server/src/binary/handlers/personal_access_tokens/create_personal_access_token_handler.rs b/core/server/src/binary/handlers/personal_access_tokens/create_personal_access_token_handler.rs
index 35e8866f4..780acab09 100644
--- a/core/server/src/binary/handlers/personal_access_tokens/create_personal_access_token_handler.rs
+++ b/core/server/src/binary/handlers/personal_access_tokens/create_personal_access_token_handler.rs
@@ -50,7 +50,7 @@ impl ServerCommandHandler for CreatePersonalAccessToken {
let (personal_access_token, token) = shard
.create_personal_access_token(session, &self.name, self.expiry)
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to create personal access token with name: {}, session: {session}",
self.name
diff --git a/core/server/src/binary/handlers/personal_access_tokens/delete_personal_access_token_handler.rs b/core/server/src/binary/handlers/personal_access_tokens/delete_personal_access_token_handler.rs
index 188cea8bb..ac8f22a21 100644
--- a/core/server/src/binary/handlers/personal_access_tokens/delete_personal_access_token_handler.rs
+++ b/core/server/src/binary/handlers/personal_access_tokens/delete_personal_access_token_handler.rs
@@ -47,7 +47,7 @@ impl ServerCommandHandler for DeletePersonalAccessToken {
shard
.delete_personal_access_token(session, &self.name)
- .with_error_context(|error| {format!(
+ .with_error(|error| {format!(
"{COMPONENT} (error: {error}) - failed to delete personal access token with name: {token_name}, session: {session}"
)})?;
diff --git a/core/server/src/binary/handlers/personal_access_tokens/get_personal_access_tokens_handler.rs b/core/server/src/binary/handlers/personal_access_tokens/get_personal_access_tokens_handler.rs
index 31d6a158e..5247e4569 100644
--- a/core/server/src/binary/handlers/personal_access_tokens/get_personal_access_tokens_handler.rs
+++ b/core/server/src/binary/handlers/personal_access_tokens/get_personal_access_tokens_handler.rs
@@ -23,7 +23,7 @@ use crate::binary::mapper;
use crate::binary::sender::SenderKind;
use crate::shard::IggyShard;
use crate::streaming::session::Session;
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::IggyError;
use iggy_common::get_personal_access_tokens::GetPersonalAccessTokens;
use std::rc::Rc;
@@ -44,7 +44,7 @@ impl ServerCommandHandler for GetPersonalAccessTokens {
debug!("session: {session}, command: {self}");
let personal_access_tokens = shard
.get_personal_access_tokens(session)
- .with_error_context(|error| {
+ .with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to get personal access tokens with session: {session}")
})?;
let personal_access_tokens = mapper::map_personal_access_tokens(personal_access_tokens);
diff --git a/core/server/src/binary/handlers/personal_access_tokens/login_with_personal_access_token_handler.rs b/core/server/src/binary/handlers/personal_access_tokens/login_with_personal_access_token_handler.rs
index 8606fa99f..a15943589 100644
--- a/core/server/src/binary/handlers/personal_access_tokens/login_with_personal_access_token_handler.rs
+++ b/core/server/src/binary/handlers/personal_access_tokens/login_with_personal_access_token_handler.rs
@@ -45,7 +45,7 @@ impl ServerCommandHandler for LoginWithPersonalAccessToken {
debug!("session: {session}, command: {self}");
let user = shard
.login_with_personal_access_token(&self.token, Some(session))
- .with_error_context(|error| {
+ .with_error(|error| {
let redacted_token = if self.token.len() > 4 {
format!("{}****", &self.token[..4])
} else {
diff --git a/core/server/src/binary/handlers/segments/delete_segments_handler.rs b/core/server/src/binary/handlers/segments/delete_segments_handler.rs
index c01430a1d..e8b2a2fac 100644
--- a/core/server/src/binary/handlers/segments/delete_segments_handler.rs
+++ b/core/server/src/binary/handlers/segments/delete_segments_handler.rs
@@ -94,7 +94,7 @@ impl ServerCommandHandler for DeleteSegments {
shard
.delete_segments_base(&stream_id, &topic_id, partition_id, segments_count)
.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to delete segments for topic with ID: {topic_id} in stream with ID: {stream_id}, session: {session}",
)
diff --git a/core/server/src/binary/handlers/streams/create_stream_handler.rs b/core/server/src/binary/handlers/streams/create_stream_handler.rs
index 76f1f67fb..da9cfbed8 100644
--- a/core/server/src/binary/handlers/streams/create_stream_handler.rs
+++ b/core/server/src/binary/handlers/streams/create_stream_handler.rs
@@ -32,7 +32,7 @@ use crate::state::command::EntryCommand;
use crate::state::models::CreateStreamWithId;
use crate::streaming::session::Session;
use anyhow::Result;
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::create_stream::CreateStream;
use iggy_common::{Identifier, IggyError};
use std::rc::Rc;
@@ -94,7 +94,7 @@ impl ServerCommandHandler for CreateStream {
command: self
}))
.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to apply create stream for id: {created_stream_id}, session: {session}"
)
@@ -119,7 +119,7 @@ impl ServerCommandHandler for CreateStream {
command: self
}))
.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to apply create stream for id: {created_stream_id}, session: {session}"
)
diff --git a/core/server/src/binary/handlers/streams/delete_stream_handler.rs b/core/server/src/binary/handlers/streams/delete_stream_handler.rs
index 4d162bbf8..1577a4eb8 100644
--- a/core/server/src/binary/handlers/streams/delete_stream_handler.rs
+++ b/core/server/src/binary/handlers/streams/delete_stream_handler.rs
@@ -54,7 +54,7 @@ impl ServerCommandHandler for DeleteStream {
let stream = shard
.delete_stream(session, &self.stream_id)
.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to delete stream with ID: {stream_id}, session: {session}")
})?;
info!(
diff --git a/core/server/src/binary/handlers/streams/get_stream_handler.rs b/core/server/src/binary/handlers/streams/get_stream_handler.rs
index 262a2b79d..7a0700cc2 100644
--- a/core/server/src/binary/handlers/streams/get_stream_handler.rs
+++ b/core/server/src/binary/handlers/streams/get_stream_handler.rs
@@ -25,7 +25,7 @@ use crate::slab::traits_ext::EntityComponentSystem;
use crate::streaming::session::Session;
use crate::streaming::streams;
use anyhow::Result;
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::IggyError;
use iggy_common::get_stream::GetStream;
use std::rc::Rc;
@@ -53,7 +53,7 @@ impl ServerCommandHandler for GetStream {
.permissioner
.borrow()
.get_stream(session.get_user_id(), stream_id)
- .with_error_context(|e| {
+ .with_error(|e| {
format!(
"permission denied to get stream with ID: {} for user with ID: {}, error: {e}",
self.stream_id,
diff --git a/core/server/src/binary/handlers/streams/get_streams_handler.rs b/core/server/src/binary/handlers/streams/get_streams_handler.rs
index f6b192764..813f66d44 100644
--- a/core/server/src/binary/handlers/streams/get_streams_handler.rs
+++ b/core/server/src/binary/handlers/streams/get_streams_handler.rs
@@ -49,7 +49,7 @@ impl ServerCommandHandler for GetStreams {
.permissioner
.borrow()
.get_streams(session.get_user_id())
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - permission denied to get streams for user {}",
session.get_user_id()
diff --git a/core/server/src/binary/handlers/streams/purge_stream_handler.rs b/core/server/src/binary/handlers/streams/purge_stream_handler.rs
index 3dd8c66b3..4cf40f421 100644
--- a/core/server/src/binary/handlers/streams/purge_stream_handler.rs
+++ b/core/server/src/binary/handlers/streams/purge_stream_handler.rs
@@ -49,7 +49,7 @@ impl ServerCommandHandler for PurgeStream {
shard
.purge_stream(session, &self.stream_id).await
- .with_error_context(|error| {
+ .with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to purge stream with id: {stream_id}, session: {session}")
})?;
let event = ShardEvent::PurgedStream {
diff --git a/core/server/src/binary/handlers/streams/update_stream_handler.rs b/core/server/src/binary/handlers/streams/update_stream_handler.rs
index 18268a090..832d92dc5 100644
--- a/core/server/src/binary/handlers/streams/update_stream_handler.rs
+++ b/core/server/src/binary/handlers/streams/update_stream_handler.rs
@@ -48,7 +48,7 @@ impl ServerCommandHandler for UpdateStream {
let stream_id = self.stream_id.clone();
shard
.update_stream(session, &self.stream_id, self.name.clone())
- .with_error_context(|error| {
+ .with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to update stream with id: {stream_id}, session: {session}")
})?;
diff --git a/core/server/src/binary/handlers/system/get_clients_handler.rs b/core/server/src/binary/handlers/system/get_clients_handler.rs
index 9c5f1cd3e..5bc63ba83 100644
--- a/core/server/src/binary/handlers/system/get_clients_handler.rs
+++ b/core/server/src/binary/handlers/system/get_clients_handler.rs
@@ -23,7 +23,7 @@ use crate::binary::mapper;
use crate::binary::sender::SenderKind;
use crate::shard::IggyShard;
use crate::streaming::session::Session;
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::IggyError;
use iggy_common::get_clients::GetClients;
use std::rc::Rc;
@@ -43,7 +43,7 @@ impl ServerCommandHandler for GetClients {
) -> Result<(), IggyError> {
debug!("session: {session}, command: {self}");
- let clients = shard.get_clients(session).with_error_context(|error| {
+ let clients = shard.get_clients(session).with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to get clients, session: {session}")
})?;
let clients = mapper::map_clients(clients).await;
diff --git a/core/server/src/binary/handlers/system/get_me_handler.rs b/core/server/src/binary/handlers/system/get_me_handler.rs
index 61247f3c0..f440c02cb 100644
--- a/core/server/src/binary/handlers/system/get_me_handler.rs
+++ b/core/server/src/binary/handlers/system/get_me_handler.rs
@@ -23,7 +23,7 @@ use crate::binary::mapper;
use crate::binary::sender::SenderKind;
use crate::shard::IggyShard;
use crate::streaming::session::Session;
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::IggyError;
use iggy_common::get_me::GetMe;
use std::rc::Rc;
@@ -42,7 +42,7 @@ impl ServerCommandHandler for GetMe {
) -> Result<(), IggyError> {
let Some(client) = shard
.get_client(session, session.client_id)
- .with_error_context(|error| {
+ .with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to get current client for session: {session}")
})?
else {
diff --git a/core/server/src/binary/handlers/system/get_stats_handler.rs b/core/server/src/binary/handlers/system/get_stats_handler.rs
index 3d9fba7aa..9ddb52d02 100644
--- a/core/server/src/binary/handlers/system/get_stats_handler.rs
+++ b/core/server/src/binary/handlers/system/get_stats_handler.rs
@@ -27,7 +27,7 @@ use crate::shard::transmission::message::{
ShardMessage, ShardRequest, ShardRequestPayload, ShardSendRequestResult,
};
use crate::streaming::session::Session;
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::get_stats::GetStats;
use iggy_common::{Identifier, IggyError};
use std::rc::Rc;
@@ -60,7 +60,7 @@ impl ServerCommandHandler for GetStats {
let message = ShardMessage::Request(request);
match shard.send_request_to_shard_or_recoil(None, message).await? {
ShardSendRequestResult::Recoil(_) => {
- let stats = shard.get_stats().await.with_error_context(|error| {
+ let stats = shard.get_stats().await.with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to get stats, session: {session}"
)
diff --git a/core/server/src/binary/handlers/topics/create_topic_handler.rs b/core/server/src/binary/handlers/topics/create_topic_handler.rs
index af0b0944e..79750bf58 100644
--- a/core/server/src/binary/handlers/topics/create_topic_handler.rs
+++ b/core/server/src/binary/handlers/topics/create_topic_handler.rs
@@ -33,7 +33,7 @@ use crate::state::models::CreateTopicWithId;
use crate::streaming::session::Session;
use crate::streaming::streams;
use anyhow::Result;
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::create_topic::CreateTopic;
use iggy_common::{Identifier, IggyError};
use std::rc::Rc;
@@ -141,7 +141,7 @@ impl ServerCommandHandler for CreateTopic {
command: self
}))
.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to apply create topic for stream_id: {stream_id_num}, topic_id: {topic_id:?}"
)
@@ -176,7 +176,7 @@ impl ServerCommandHandler for CreateTopic {
command: self
}))
.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to apply create topic for stream_id: {stream_id}, topic_id: {topic_id:?}"
)
diff --git a/core/server/src/binary/handlers/topics/update_topic_handler.rs b/core/server/src/binary/handlers/topics/update_topic_handler.rs
index 5e5d922ed..25e184d27 100644
--- a/core/server/src/binary/handlers/topics/update_topic_handler.rs
+++ b/core/server/src/binary/handlers/topics/update_topic_handler.rs
@@ -26,7 +26,7 @@ use crate::state::command::EntryCommand;
use crate::streaming::session::Session;
use crate::streaming::topics;
use anyhow::Result;
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::update_topic::UpdateTopic;
use iggy_common::{Identifier, IggyError};
use std::rc::Rc;
diff --git a/core/server/src/binary/handlers/users/change_password_handler.rs b/core/server/src/binary/handlers/users/change_password_handler.rs
index 8c02b9c5d..e9feed7aa 100644
--- a/core/server/src/binary/handlers/users/change_password_handler.rs
+++ b/core/server/src/binary/handlers/users/change_password_handler.rs
@@ -56,7 +56,7 @@ impl ServerCommandHandler for ChangePassword {
&self.current_password,
&self.new_password,
)
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to change password for user_id: {}, session: {session}",
self.user_id
diff --git a/core/server/src/binary/handlers/users/create_user_handler.rs b/core/server/src/binary/handlers/users/create_user_handler.rs
index 02ca11e62..e02fb6efd 100644
--- a/core/server/src/binary/handlers/users/create_user_handler.rs
+++ b/core/server/src/binary/handlers/users/create_user_handler.rs
@@ -31,7 +31,7 @@ use crate::state::models::CreateUserWithId;
use crate::streaming::session::Session;
use crate::streaming::utils::crypto;
use anyhow::Result;
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::create_user::CreateUser;
use iggy_common::{Identifier, IggyError};
use std::rc::Rc;
@@ -80,7 +80,7 @@ impl ServerCommandHandler for CreateUser {
{
let user = shard
.create_user(session, &username, &password, status, permissions.clone())
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to create user with name: {}, session: {}",
username, session
@@ -115,7 +115,7 @@ impl ServerCommandHandler for CreateUser {
}),
)
.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to apply create user with name: {}, session: {session}",
self.username
@@ -150,7 +150,7 @@ impl ServerCommandHandler for CreateUser {
}),
)
.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to apply create user for user_id: {user_id}, session: {session}"
)
diff --git a/core/server/src/binary/handlers/users/delete_user_handler.rs b/core/server/src/binary/handlers/users/delete_user_handler.rs
index 6188411ae..66addda04 100644
--- a/core/server/src/binary/handlers/users/delete_user_handler.rs
+++ b/core/server/src/binary/handlers/users/delete_user_handler.rs
@@ -51,7 +51,7 @@ impl ServerCommandHandler for DeleteUser {
info!("Deleting user with ID: {}...", self.user_id);
let user = shard
.delete_user(session, &self.user_id)
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to delete user with ID: {}, session: {session}",
self.user_id
diff --git a/core/server/src/binary/handlers/users/get_users_handler.rs b/core/server/src/binary/handlers/users/get_users_handler.rs
index 163de4cca..49dd96eec 100644
--- a/core/server/src/binary/handlers/users/get_users_handler.rs
+++ b/core/server/src/binary/handlers/users/get_users_handler.rs
@@ -25,7 +25,7 @@ use crate::binary::mapper;
use crate::binary::sender::SenderKind;
use crate::shard::IggyShard;
use crate::streaming::session::Session;
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::IggyError;
use iggy_common::get_users::GetUsers;
use tracing::debug;
@@ -43,7 +43,7 @@ impl ServerCommandHandler for GetUsers {
shard: &Rc<IggyShard>,
) -> Result<(), IggyError> {
debug!("session: {session}, command: {self}");
- let users = shard.get_users(session).await.with_error_context(|error| {
+ let users = shard.get_users(session).await.with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to get users, session: {session}")
})?;
let users = mapper::map_users(users);
diff --git a/core/server/src/binary/handlers/users/login_user_handler.rs b/core/server/src/binary/handlers/users/login_user_handler.rs
index 26fe3c858..3908d2cbf 100644
--- a/core/server/src/binary/handlers/users/login_user_handler.rs
+++ b/core/server/src/binary/handlers/users/login_user_handler.rs
@@ -54,7 +54,7 @@ impl ServerCommandHandler for LoginUser {
info!("Logging in user: {} ...", &username);
let user = shard
.login_user(&username, &password, Some(session))
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to login user with name: {}, session: {session}",
username
diff --git a/core/server/src/binary/handlers/users/logout_user_handler.rs b/core/server/src/binary/handlers/users/logout_user_handler.rs
index 10e246ea1..ae33e9d5d 100644
--- a/core/server/src/binary/handlers/users/logout_user_handler.rs
+++ b/core/server/src/binary/handlers/users/logout_user_handler.rs
@@ -46,7 +46,7 @@ impl ServerCommandHandler for LogoutUser {
) -> Result<(), IggyError> {
debug!("session: {session}, command: {self}");
info!("Logging out user with ID: {}...", session.get_user_id());
- shard.logout_user(session).with_error_context(|error| {
+ shard.logout_user(session).with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to logout user, session: {session}")
})?;
info!("Logged out user with ID: {}.", session.get_user_id());
diff --git a/core/server/src/binary/handlers/users/update_permissions_handler.rs b/core/server/src/binary/handlers/users/update_permissions_handler.rs
index 47d81d3ca..5172a8a23 100644
--- a/core/server/src/binary/handlers/users/update_permissions_handler.rs
+++ b/core/server/src/binary/handlers/users/update_permissions_handler.rs
@@ -50,7 +50,7 @@ impl ServerCommandHandler for UpdatePermissions {
shard
.update_permissions(session, &self.user_id, self.permissions.clone())
- .with_error_context(|error| format!("{COMPONENT} (error: {error}) - failed to update permissions for user_id: {}, session: {session}",
+ .with_error(|error| format!("{COMPONENT} (error: {error}) - failed to update permissions for user_id: {}, session: {session}",
self.user_id
))?;
info!("Updated permissions for user with ID: {}.", self.user_id);
diff --git a/core/server/src/binary/handlers/users/update_user_handler.rs b/core/server/src/binary/handlers/users/update_user_handler.rs
index f5160dd41..e5604327a 100644
--- a/core/server/src/binary/handlers/users/update_user_handler.rs
+++ b/core/server/src/binary/handlers/users/update_user_handler.rs
@@ -55,7 +55,7 @@ impl ServerCommandHandler for UpdateUser {
self.username.clone(),
self.status,
)
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to update user with user_id: {}, session: {session}",
self.user_id
diff --git a/core/server/src/bootstrap.rs b/core/server/src/bootstrap.rs
index 83a3b3cda..c96c01128 100644
--- a/core/server/src/bootstrap.rs
+++ b/core/server/src/bootstrap.rs
@@ -44,7 +44,7 @@ use crate::{
};
use ahash::HashMap;
use compio::{fs::create_dir_all, runtime::Runtime};
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::{
ConsumerKind, IggyByteSize, IggyError,
defaults::{
@@ -488,7 +488,7 @@ pub async fn load_segments(
.unwrap()
.load_all_indexes_from_disk()
.await
- .with_error_context(|error| format!("Failed to load indexes during startup for stream ID: {}, topic ID: {}, partition_id: {}, {error}", stream_id, topic_id, partition_id))
+ .with_error(|error| format!("Failed to load indexes during startup for stream ID: {}, topic ID: {}, partition_id: {}, {error}", stream_id, topic_id, partition_id))
.map_err(|_| IggyError::CannotReadFile)?
};
@@ -542,7 +542,7 @@ pub async fn load_segments(
match messages_reader.load_messages_from_disk(batch_indexes).await {
Ok(messages_batch) => {
if let Err(e) = messages_batch.validate_checksums() {
- return Err(IggyError::CannotReadPartitions).with_error_context(|_| {
+ return Err(IggyError::CannotReadPartitions).with_error(|_| {
format!(
"Failed to validate message checksum for segment at offset {} in stream ID: {}, topic ID: {}, partition ID: {}, error: {}",
start_offset, stream_id, topic_id, partition_id, e
@@ -553,7 +553,7 @@ pub async fn load_segments(
current_relative_offset += batch_count;
}
Err(e) => {
- return Err(e).with_error_context(|_| {
+ return Err(e).with_error(|_| {
format!(
"Failed to load messages from disk for checksum validation at offset {} in stream ID: {}, topic ID: {}, partition ID: {}",
start_offset, stream_id, topic_id, partition_id
diff --git a/core/server/src/configs/config_provider.rs b/core/server/src/configs/config_provider.rs
new file mode 100644
index 000000000..b77ec4bdf
--- /dev/null
+++ b/core/server/src/configs/config_provider.rs
@@ -0,0 +1,442 @@
+/* Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+use crate::IGGY_ROOT_PASSWORD_ENV;
+use crate::configs::server::ServerConfig;
+use crate::server_error::ConfigError;
+use figment::{
+ Error, Figment, Metadata, Profile, Provider,
+ providers::{Format, Toml},
+ value::{Dict, Map as FigmentMap, Tag, Value as FigmentValue},
+};
+use std::{env, future::Future, path::Path};
+use toml::{Value as TomlValue, map::Map};
+
+const DEFAULT_CONFIG_PROVIDER: &str = "file";
+const DEFAULT_CONFIG_PATH: &str = "configs/server.toml";
+const SECRET_KEYS: [&str; 6] = [
+ IGGY_ROOT_PASSWORD_ENV,
+ "IGGY_DATA_MAINTENANCE_ARCHIVER_S3_KEY_SECRET",
+ "IGGY_HTTP_JWT_ENCODING_SECRET",
+ "IGGY_HTTP_JWT_DECODING_SECRET",
+ "IGGY_TCP_TLS_PASSWORD",
+ "IGGY_SYSTEM_ENCRYPTION_KEY",
+];
+
+pub enum ConfigProviderKind {
+ File(FileConfigProvider),
+}
+
+impl ConfigProviderKind {
+ pub async fn load_config(&self) -> Result<ServerConfig, ConfigError> {
+ match self {
+ Self::File(p) => p.load_config().await,
+ }
+ }
+}
+
+pub trait ConfigProvider {
+ fn load_config(&self) -> impl Future<Output = Result<ServerConfig, ConfigError>>;
+}
+
+#[derive(Debug)]
+pub struct FileConfigProvider {
+ path: String,
+}
+
+pub struct CustomEnvProvider {
+ prefix: String,
+}
+
+impl FileConfigProvider {
+ pub fn new(path: String) -> Self {
+ Self { path }
+ }
+}
+
+impl CustomEnvProvider {
+ pub fn new(prefix: &str) -> Self {
+ Self {
+ prefix: prefix.to_string(),
+ }
+ }
+
+ fn walk_toml_table_to_dict(prefix: &str, table: Map<String, TomlValue>, dict: &mut Dict) {
+ for (key, value) in table {
+ let new_prefix = if prefix.is_empty() {
+ key.clone()
+ } else {
+ format!("{prefix}.{key}")
+ };
+ match value {
+ TomlValue::Table(inner_table) => {
+ let mut nested_dict = Dict::new();
+ Self::walk_toml_table_to_dict(&new_prefix, inner_table, &mut nested_dict);
+ dict.insert(key, FigmentValue::from(nested_dict));
+ }
+ _ => {
+ dict.insert(key, Self::toml_to_figment_value(&value));
+ }
+ }
+ }
+ }
+
+ fn insert_overridden_values_from_env(
+ source: &Dict,
+ target: &mut Dict,
+ keys: Vec<String>,
+ value: FigmentValue,
+ ) {
+ if keys.is_empty() {
+ return;
+ }
+
+ // Detect array patterns (e.g., cluster.nodes.0.id)
+ if let Some((idx_pos, array_index)) = Self::find_array_index(&keys) {
+ Self::handle_array_override(source, target, &keys, idx_pos, array_index, value);
+ } else {
+ Self::handle_dict_override(source, target, &keys, value);
+ }
+ }
+
+ fn find_array_index(keys: &[String]) -> Option<(usize, usize)> {
+ keys.iter()
+ .enumerate()
+ .find_map(|(i, key)| key.parse::<usize>().ok().map(|idx| (i, idx)))
+ }
+
+ fn handle_array_override(
+ source: &Dict,
+ target: &mut Dict,
+ keys: &[String],
+ idx_pos: usize,
+ array_index: usize,
+ value: FigmentValue,
+ ) {
+ let path_to_array = &keys[..idx_pos];
+ let remaining_path = &keys[idx_pos + 1..];
+
+ // Navigate to array container
+ let current_target = match Self::navigate_to_dict(
+ target,
+ &path_to_array[..path_to_array.len().saturating_sub(1)],
+ ) {
+ Some(dict) => dict,
+ None => return,
+ };
+
+ let array_key = match path_to_array.last() {
+ Some(key) => key.clone(),
+ None => return,
+ };
+
+ // Copy existing array from source if needed
+ if !current_target.contains_key(&array_key) {
+ if let Some(existing_array) = Self::find_source_array(source, path_to_array, &array_key)
+ {
+ current_target.insert(array_key.clone(), existing_array);
+ } else {
+ current_target.insert(
+ array_key.clone(),
+ FigmentValue::Array(Tag::Default, Vec::new()),
+ );
+ }
+ }
+
+ // Update array element
+ if let Some(FigmentValue::Array(_, arr)) = current_target.get_mut(&array_key) {
+ // Ensure array is large enough
+ while arr.len() <= array_index {
+ arr.push(FigmentValue::Dict(Tag::Default, Dict::new()));
+ }
+
+ if remaining_path.is_empty() {
+ arr[array_index] = value;
+ } else if let FigmentValue::Dict(_, elem_dict) = &mut arr[array_index] {
+ Self::insert_overridden_values_from_env(
+ &Dict::new(),
+ elem_dict,
+ remaining_path.to_vec(),
+ value,
+ );
+ }
+ }
+ }
+
+ fn handle_dict_override(
+ source: &Dict,
+ target: &mut Dict,
+ keys: &[String],
+ value: FigmentValue,
+ ) {
+ let mut current_source = source;
+ let mut current_target = target;
+ let mut combined_keys = Vec::new();
+
+ for (i, key) in keys.iter().enumerate() {
+ combined_keys.push(key.clone());
+ let key_to_check = combined_keys.join("_");
+
+ match current_source.get(&key_to_check) {
+ Some(FigmentValue::Dict(_, inner_source_dict)) => {
+ current_target
+ .entry(key_to_check.clone())
+ .or_insert_with(|| FigmentValue::Dict(Tag::Default, Dict::new()));
+
+ if let Some(FigmentValue::Dict(_, inner_target)) =
+ current_target.get_mut(&key_to_check)
+ {
+ current_source = inner_source_dict;
+ current_target = inner_target;
+ combined_keys.clear();
+ } else {
+ return;
+ }
+ }
+ Some(_) => {
+ current_target.insert(key_to_check, value);
+ return;
+ }
+ None if i == keys.len() - 1 => {
+ current_target.insert(key_to_check, value);
+ return;
+ }
+ _ => continue,
+ }
+ }
+ }
+
+ fn navigate_to_dict<'a>(target: &'a mut Dict, path: &[String]) -> Option<&'a mut Dict> {
+ if path.is_empty() {
+ return Some(target);
+ }
+
+ let mut current = target;
+ let mut combined_keys = Vec::new();
+
+ for key in path {
+ combined_keys.push(key.clone());
+ let key_to_check = combined_keys.join("_");
+
+ current
+ .entry(key_to_check.clone())
+ .or_insert_with(|| FigmentValue::Dict(Tag::Default, Dict::new()));
+
+ match current.get_mut(&key_to_check) {
+ Some(FigmentValue::Dict(_, inner)) => {
+ current = inner;
+ combined_keys.clear();
+ }
+ _ => return None,
+ }
+ }
+
+ Some(current)
+ }
+
+ fn find_source_array(source: &Dict, path: &[String], array_key: &str) -> Option<FigmentValue> {
+ if path.is_empty() {
+ return None;
+ }
+
+ let mut current = source;
+ let mut combined_keys = Vec::new();
+
+ for key in &path[..path.len() - 1] {
+ combined_keys.push(key.clone());
+ let key_to_check = combined_keys.join("_");
+
+ match current.get(&key_to_check) {
+ Some(FigmentValue::Dict(_, inner)) => {
+ current = inner;
+ combined_keys.clear();
+ }
+ _ => return None,
+ }
+ }
+
+ current.get(array_key).cloned()
+ }
+
+ fn toml_to_figment_value(toml_value: &TomlValue) -> FigmentValue {
+ match toml_value {
+ TomlValue::String(s) => FigmentValue::from(s.clone()),
+ TomlValue::Integer(i) => FigmentValue::from(*i),
+ TomlValue::Float(f) => FigmentValue::from(*f),
+ TomlValue::Boolean(b) => FigmentValue::from(*b),
+ TomlValue::Array(arr) => {
+ let vec: Vec<FigmentValue> = arr.iter().map(Self::toml_to_figment_value).collect();
+ FigmentValue::from(vec)
+ }
+ TomlValue::Table(tbl) => {
+ let mut dict = figment::value::Dict::new();
+ for (key, value) in tbl.iter() {
+ dict.insert(key.clone(), Self::toml_to_figment_value(value));
+ }
+ FigmentValue::from(dict)
+ }
+ TomlValue::Datetime(_) => todo!("not implemented yet!"),
+ }
+ }
+
+ fn try_parse_value(value: &str) -> FigmentValue {
+ if value.starts_with('[') && value.ends_with(']') {
+ let value = value.trim_start_matches('[').trim_end_matches(']');
+ let values: Vec<FigmentValue> = value.split(',').map(Self::try_parse_value).collect();
+ return FigmentValue::from(values);
+ }
+ if value == "true" {
+ return FigmentValue::from(true);
+ }
+ if value == "false" {
+ return FigmentValue::from(false);
+ }
+ if let Ok(int_val) = value.parse::<i64>() {
+ return FigmentValue::from(int_val);
+ }
+ if let Ok(float_val) = value.parse::<f64>() {
+ return FigmentValue::from(float_val);
+ }
+ FigmentValue::from(value)
+ }
+}
+
+impl Provider for CustomEnvProvider {
+ fn metadata(&self) -> Metadata {
+ Metadata::named("iggy-server config")
+ }
+
+ fn data(&self) -> Result<FigmentMap<Profile, Dict>, Error> {
+ let default_config = toml::to_string(&ServerConfig::default())
+ .expect("Cannot serialize default ServerConfig. Something's terribly wrong.");
+ let toml_value: TomlValue = toml::from_str(&default_config).unwrap();
+ let mut source_dict = Dict::new();
+ if let TomlValue::Table(table) = toml_value {
+ Self::walk_toml_table_to_dict("", table, &mut source_dict);
+ }
+
+ let mut new_dict = Dict::new();
+ for (key, mut value) in env::vars() {
+ let env_key = key.to_uppercase();
+ if !env_key.starts_with(self.prefix.as_str()) {
+ continue;
+ }
+ let keys: Vec<String> = env_key[self.prefix.len()..]
+ .split('_')
+ .map(|k| k.to_lowercase())
+ .collect();
+ let env_var_value = Self::try_parse_value(&value);
+ if SECRET_KEYS.contains(&env_key.as_str()) {
+ value = "******".to_string();
+ }
+
+ println!("{env_key} value changed to: {value} from environment variable");
+ Self::insert_overridden_values_from_env(
+ &source_dict,
+ &mut new_dict,
+ keys.clone(),
+ env_var_value.clone(),
+ );
+ }
+ let mut data = FigmentMap::new();
+ data.insert(Profile::default(), new_dict);
+
+ Ok(data)
+ }
+}
+
+pub fn resolve(config_provider_type: &str) -> Result<ConfigProviderKind, ConfigError> {
+ match config_provider_type {
+ DEFAULT_CONFIG_PROVIDER => {
+ let path =
+ env::var("IGGY_CONFIG_PATH").unwrap_or_else(|_| DEFAULT_CONFIG_PATH.to_string());
+ Ok(ConfigProviderKind::File(FileConfigProvider::new(path)))
+ }
+ _ => Err(ConfigError::InvalidConfigurationProvider {
+ provider_type: config_provider_type.to_string(),
+ }),
+ }
+}
+
+/// This does exactly the same as Figment does internally.
+fn file_exists<P: AsRef<Path>>(path: P) -> bool {
+ let path = path.as_ref();
+
+ if path.is_absolute() {
+ return path.is_file();
+ }
+
+ let cwd = match std::env::current_dir() {
+ Ok(dir) => dir,
+ Err(_) => return false,
+ };
+
+ let mut current_dir = cwd.as_path();
+ loop {
+ let file_path = current_dir.join(path);
+ if file_path.is_file() {
+ return true;
+ }
+
+ current_dir = match current_dir.parent() {
+ Some(parent) => parent,
+ None => return false,
+ };
+ }
+}
+
+impl ConfigProvider for FileConfigProvider {
+ async fn load_config(&self) -> Result<ServerConfig, ConfigError> {
+ println!("Loading config from path: '{}'...", self.path);
+
+ // Include the default configuration from server.toml
+ let embedded_default_config = Toml::string(include_str!("../../../configs/server.toml"));
+
+ // Start with the default configuration
+ let mut config_builder = Figment::new().merge(embedded_default_config);
+
+ // If the server.toml file exists, merge it into the configuration
+ if file_exists(&self.path) {
+ println!("Found configuration file at path: '{}'.", self.path);
+ config_builder = config_builder.merge(Toml::file(&self.path));
+ } else {
+ println!(
+ "Configuration file not found at path: '{}'. Using default configuration from embedded server.toml.",
+ self.path
+ );
+ }
+
+ // Merge environment variables into the configuration
+ config_builder = config_builder.merge(CustomEnvProvider::new("IGGY_"));
+
+ // Finally, attempt to extract the final configuration
+ let config_result: Result<ServerConfig, figment::Error> = config_builder.extract();
+
+ match config_result {
+ Ok(config) => {
+ println!("Config loaded successfully.");
+ println!("Using Config: {config}");
+ Ok(config)
+ }
+ Err(e) => {
+ println!("Failed to load config: {e}");
+ Err(ConfigError::CannotLoadConfiguration)
+ }
+ }
+ }
+}
diff --git a/core/server/src/configs/defaults.rs b/core/server/src/configs/defaults.rs
index bef09df78..7aed1e606 100644
--- a/core/server/src/configs/defaults.rs
+++ b/core/server/src/configs/defaults.rs
@@ -38,8 +38,6 @@ use crate::configs::tcp::{TcpConfig, TcpTlsConfig};
use crate::configs::websocket::{WebSocketConfig, WebSocketTlsConfig};
use iggy_common::IggyByteSize;
use iggy_common::IggyDuration;
-use iggy_common::TransportProtocol;
-use std::str::FromStr;
use std::sync::Arc;
use std::time::Duration;
diff --git a/core/server/src/configs/server.rs b/core/server/src/configs/server.rs
index 245cf599f..26b6ef033 100644
--- a/core/server/src/configs/server.rs
+++ b/core/server/src/configs/server.rs
@@ -27,35 +27,14 @@ use crate::configs::websocket::WebSocketConfig;
use crate::server_error::ConfigError;
use derive_more::Display;
use err_trail::ErrContext;
-use figment::Metadata;
-use figment::Profile;
-use figment::Provider;
-use figment::providers::Format;
-use figment::providers::Toml;
-use figment::value::Dict;
-use iggy_common::ConfigProvider;
-use iggy_common::CustomEnvProvider;
-use iggy_common::FileConfigProvider;
use iggy_common::IggyDuration;
use iggy_common::Validatable;
use serde::{Deserialize, Serialize};
use serde_with::DisplayFromStr;
use serde_with::serde_as;
-use std::env;
use std::str::FromStr;
use std::sync::Arc;
-const DEFAULT_CONFIG_PROVIDER: &str = "file";
-const DEFAULT_CONFIG_PATH: &str = "core/configs/server.toml";
-const SECRET_KEYS: [&str; 6] = [
- IGGY_ROOT_PASSWORD_ENV,
- "IGGY_DATA_MAINTENANCE_ARCHIVER_S3_KEY_SECRET",
- "IGGY_HTTP_JWT_ENCODING_SECRET",
- "IGGY_HTTP_JWT_DECODING_SECRET",
- "IGGY_TCP_TLS_PASSWORD",
- "IGGY_SYSTEM_ENCRYPTION_KEY",
-];
-
#[derive(Debug, Deserialize, Serialize, Clone)]
pub struct ServerConfig {
pub data_maintenance: DataMaintenanceConfig,
@@ -182,38 +161,8 @@ impl FromStr for TelemetryTransport {
}
}
-pub fn resolve(config_provider_type: &str) -> Result<ConfigProviderKind, ConfigError> {
- match config_provider_type {
- DEFAULT_CONFIG_PROVIDER => {
- let path =
- env::var("IGGY_CONFIG_PATH").unwrap_or_else(|_| DEFAULT_CONFIG_PATH.to_string());
- Ok(ConfigProviderKind::File(
- ServerConfig::file_config_provider(path),
- ))
- }
- _ => Err(ConfigError::InvalidConfigurationProvider {
- provider_type: config_provider_type.to_string(),
- }),
- }
-}
-
-pub enum ConfigProviderKind {
- File(FileConfigProvider<ServerEnvProvider>),
-}
-
-impl ConfigProviderKind {
- pub async fn load_config(self) -> Result<ServerConfig, ConfigError> {
- match self {
- Self::File(p) => p
- .load_config()
- .await
- .map_err(|_| ConfigError::CannotLoadConfiguration),
- }
- }
-}
-
impl ServerConfig {
- pub async fn load(config_provider: ConfigProviderKind) -> Result<Self, ConfigError> {
+ pub async fn load(config_provider: &ConfigProviderKind) -> Result<ServerConfig, ConfigError> {
let server_config = config_provider.load_config().await.with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to load config provider config")
})?;
@@ -222,39 +171,4 @@ impl ServerConfig {
})?;
Ok(server_config)
}
-
- pub fn file_config_provider(path: String) -> FileConfigProvider<ServerEnvProvider> {
- let default_config = Toml::string(include_str!("../../../configs/server.toml"));
- FileConfigProvider::new(
- path,
- ServerEnvProvider::default(),
- true,
- Some(default_config),
- )
- }
-}
-
-#[derive(Debug, Clone)]
-pub struct ServerEnvProvider {
- provider: CustomEnvProvider<ServerConfig>,
-}
-
-impl Default for ServerEnvProvider {
- fn default() -> Self {
- Self {
- provider: CustomEnvProvider::new("IGGY_", &SECRET_KEYS),
- }
- }
-}
-
-impl Provider for ServerEnvProvider {
- fn metadata(&self) -> Metadata {
- Metadata::named("iggy-server-config")
- }
-
- fn data(&self) -> Result<figment::value::Map<Profile, Dict>, figment::Error> {
- self.provider.deserialize().map_err(|_| {
- figment::Error::from("Cannot deserialize environment variables for server config")
- })
- }
}
diff --git a/core/server/src/configs/validators.rs b/core/server/src/configs/validators.rs
index d5d97d1aa..9f1e4eea7 100644
--- a/core/server/src/configs/validators.rs
+++ b/core/server/src/configs/validators.rs
@@ -59,12 +59,9 @@ impl Validatable<ConfigError> for ServerConfig {
self.telemetry.validate().with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to validate telemetry config")
})?;
- self.system
- .sharding
- .validate()
- .with_error_context(|error| {
- format!("{COMPONENT} (error: {error}) - failed to validate sharding config")
- })?;
+ self.system.sharding.validate().with_error(|error| {
+ format!("{COMPONENT} (error: {error}) - failed to validate sharding config")
+ })?;
let topic_size = match self.system.topic.max_size {
MaxTopicSize::Custom(size) => Ok(size.as_bytes_u64()),
@@ -203,7 +200,7 @@ impl Validatable<ConfigError> for MessageSaverConfig {
impl Validatable<ConfigError> for DataMaintenanceConfig {
fn validate(&self) -> Result<(), ConfigError> {
- self.messages.validate().with_error_context(|error| {
+ self.messages.validate().with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to validate messages maintenance config")
})?;
self.state.validate().with_error(|error| {
diff --git a/core/server/src/http/consumer_groups.rs b/core/server/src/http/consumer_groups.rs
index 84784cdb0..b9f80fa40 100644
--- a/core/server/src/http/consumer_groups.rs
+++ b/core/server/src/http/consumer_groups.rs
@@ -168,7 +168,7 @@ async fn create_consumer_group(
&command.topic_id,
command.name.clone(),
)
- .with_error_context(|error| format!("{COMPONENT} (error: {error}) - failed to create consumer group, stream ID: {}, topic ID: {}, name: {}", stream_id, topic_id, command.name))?;
+ .with_error(|error| format!("{COMPONENT} (error: {error}) - failed to create consumer group, stream ID: {}, topic ID: {}, name: {}", stream_id, topic_id, command.name))?;
let group_id = consumer_group.id();
@@ -238,7 +238,7 @@ async fn delete_consumer_group(
&identifier_topic_id,
&identifier_group_id
)
- .with_error_context(|error| format!("{COMPONENT} (error: {error}) - failed to delete consumer group with ID: {group_id} for topic with ID: {topic_id} in stream with ID: {stream_id}"))?;
+ .with_error(|error| format!("{COMPONENT} (error: {error}) - failed to delete consumer group with ID: {group_id} for topic with ID: {topic_id} in stream with ID: {stream_id}"))?;
let cg_id = consumer_group.id();
diff --git a/core/server/src/http/messages.rs b/core/server/src/http/messages.rs
index 84e1824e1..e00b542a9 100644
--- a/core/server/src/http/messages.rs
+++ b/core/server/src/http/messages.rs
@@ -28,7 +28,7 @@ use axum::extract::{Path, Query, State};
use axum::http::StatusCode;
use axum::routing::get;
use axum::{Extension, Json, Router, debug_handler};
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::Identifier;
use iggy_common::Validatable;
use iggy_common::{Consumer, PollMessages, SendMessages};
@@ -76,7 +76,7 @@ async fn poll_messages(
));
let (metadata, messages) = poll_future.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to poll messages, stream ID: {}, topic ID: {}, partition ID: {:?}",
stream_id, topic_id, query.0.partition_id
@@ -113,7 +113,7 @@ async fn send_messages(
));
append_future.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to append messages, stream ID: {stream_id}, topic ID: {topic_id}"
)
diff --git a/core/server/src/http/partitions.rs b/core/server/src/http/partitions.rs
index eb08fa0d6..483bec2c6 100644
--- a/core/server/src/http/partitions.rs
+++ b/core/server/src/http/partitions.rs
@@ -27,7 +27,7 @@ use axum::extract::{Path, Query, State};
use axum::http::StatusCode;
use axum::routing::post;
use axum::{Extension, Json, Router, debug_handler};
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::Identifier;
use iggy_common::Validatable;
use iggy_common::create_partitions::CreatePartitions;
@@ -79,7 +79,7 @@ async fn create_partitions(
});
broadcast_future.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to broadcast partition events, stream ID: {stream_id}, topic ID: {topic_id}"
)
@@ -89,7 +89,7 @@ async fn create_partitions(
SendWrapper::new(state.shard.shard().state.apply(identity.user_id, &command));
state_future.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to apply create partitions, stream ID: {stream_id}, topic ID: {topic_id}"
)
@@ -119,7 +119,7 @@ async fn delete_partitions(
query.partitions_count,
));
- delete_future.await.with_error_context(|error| {
+ delete_future.await.with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to delete partitions for topic with ID: {topic_id} in stream with ID: {stream_id}"
)
@@ -153,7 +153,7 @@ async fn delete_partitions(
SendWrapper::new(state.shard.shard().state.apply(identity.user_id, &command));
state_future.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to apply delete partitions, stream ID: {stream_id}, topic ID: {topic_id}"
)
diff --git a/core/server/src/http/personal_access_tokens.rs b/core/server/src/http/personal_access_tokens.rs
index 2f53e0a8c..e1a2a69b8 100644
--- a/core/server/src/http/personal_access_tokens.rs
+++ b/core/server/src/http/personal_access_tokens.rs
@@ -30,7 +30,7 @@ use axum::extract::{Path, State};
use axum::http::StatusCode;
use axum::routing::{delete, get, post};
use axum::{Extension, Json, Router, debug_handler};
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::IdentityInfo;
use iggy_common::Validatable;
use iggy_common::create_personal_access_token::CreatePersonalAccessToken;
@@ -67,7 +67,7 @@ async fn get_personal_access_tokens(
.shard
.shard()
.get_personal_access_tokens(&Session::stateless(identity.user_id, identity.ip_address))
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to get personal access tokens, user ID: {}",
identity.user_id
@@ -91,7 +91,7 @@ async fn create_personal_access_token(
&command.name,
command.expiry,
)
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to create personal access token, user ID: {}",
identity.user_id
@@ -107,7 +107,7 @@ async fn create_personal_access_token(
SendWrapper::new(state.shard.shard().state.apply(identity.user_id, &command));
state_future.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to apply create personal access token with hash, user ID: {}",
identity.user_id
@@ -128,7 +128,7 @@ async fn delete_personal_access_token(
&Session::stateless(identity.user_id, identity.ip_address),
&name,
)
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to delete personal access token, user ID: {}",
identity.user_id
@@ -140,7 +140,7 @@ async fn delete_personal_access_token(
SendWrapper::new(state.shard.shard().state.apply(identity.user_id, &command));
state_future.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to apply delete personal access token, user ID: {}",
identity.user_id
@@ -159,7 +159,7 @@ async fn login_with_personal_access_token(
.shard
.shard()
.login_with_personal_access_token(&command.token, None)
- .with_error_context(|error| {
+ .with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to login with personal access token")
})?;
let tokens = state.jwt_manager.generate(user.id)?;
diff --git a/core/server/src/http/streams.rs b/core/server/src/http/streams.rs
index f2c79d81f..9b4ba07ed 100644
--- a/core/server/src/http/streams.rs
+++ b/core/server/src/http/streams.rs
@@ -26,7 +26,7 @@ use axum::extract::{Path, State};
use axum::http::StatusCode;
use axum::routing::{delete, get};
use axum::{Extension, Json, Router, debug_handler};
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::Identifier;
use iggy_common::Validatable;
use iggy_common::create_stream::CreateStream;
@@ -103,7 +103,7 @@ async fn create_stream(
.shard
.create_stream(&session, command.name.clone())
.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to create stream with name: {}",
command.name
@@ -136,7 +136,7 @@ async fn create_stream(
.shard
.apply_state(identity.user_id, &entry_command)
.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to apply create stream for id: {:?}",
created_stream_id
@@ -178,7 +178,7 @@ async fn update_stream(
state
.shard
.update_stream(&session, &command.stream_id, command.name.clone())
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to update stream, stream ID: {stream_id}"
)
@@ -203,7 +203,7 @@ async fn update_stream(
// Apply state change using wrapper method
let entry_command = EntryCommand::UpdateStream(command);
- state.shard.apply_state(identity.user_id, &entry_command).await.with_error_context(|error| {
+ state.shard.apply_state(identity.user_id, &entry_command).await.with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to apply update stream, stream ID: {stream_id}"
)
@@ -236,7 +236,7 @@ async fn delete_stream(
);
future.await
}
- .with_error_context(|error| {
+ .with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to delete stream with ID: {stream_id}",)
})?;
@@ -264,7 +264,7 @@ async fn delete_stream(
stream_id: identifier_stream_id,
});
state.shard.apply_state(identity.user_id, &entry_command).await
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to apply delete stream with ID: {stream_id}",
)
@@ -292,7 +292,7 @@ async fn purge_stream(
.shard
.purge_stream(&session, &identifier_stream_id)
.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to purge stream, stream ID: {stream_id}"
)
@@ -319,7 +319,7 @@ async fn purge_stream(
stream_id: identifier_stream_id,
});
state.shard.apply_state(identity.user_id, &entry_command).await
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to apply purge stream, stream ID: {stream_id}"
)
diff --git a/core/server/src/http/system.rs b/core/server/src/http/system.rs
index da4990374..e5db7dd19 100644
--- a/core/server/src/http/system.rs
+++ b/core/server/src/http/system.rs
@@ -67,9 +67,9 @@ async fn get_metrics(State(state): State<Arc<AppState>>) -> Result<String, Custo
#[debug_handler]
async fn get_stats(State(state): State<Arc<AppState>>) -> Result<Json<Stats>, CustomError> {
let stats_future = SendWrapper::new(state.shard.shard().get_stats());
- let stats = stats_future.await.with_error_context(|error| {
- format!("{COMPONENT} (error: {error}) - failed to get stats")
- })?;
+ let stats = stats_future
+ .await
+ .with_error(|error| format!("{COMPONENT} (error: {error}) - failed to get stats"))?;
Ok(Json(stats))
}
@@ -79,14 +79,12 @@ async fn get_cluster_metadata(
) -> Result<Json<ClusterMetadata>, CustomError> {
let shard = state.shard.shard();
let session = Session::stateless(identity.user_id, identity.ip_address);
- let cluster_metadata = shard
- .get_cluster_metadata(&session)
- .with_error_context(|error| {
- format!(
- "{COMPONENT} (error: {error}) - failed to get cluster metadata, user ID: {}",
- identity.user_id
- )
- })?;
+ let cluster_metadata = shard.get_cluster_metadata(&session).with_error(|error| {
+ format!(
+ "{COMPONENT} (error: {error}) - failed to get cluster metadata, user ID: {}",
+ identity.user_id
+ )
+ })?;
Ok(Json(cluster_metadata))
}
@@ -102,7 +100,7 @@ async fn get_client(
&Session::stateless(identity.user_id, identity.ip_address),
client_id,
)
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to get client, user ID: {}",
identity.user_id
@@ -128,7 +126,7 @@ async fn get_clients(
.shard
.shard()
.get_clients(&Session::stateless(identity.user_id, identity.ip_address))
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to get clients, user ID: {}",
identity.user_id
@@ -153,9 +151,9 @@ async fn get_snapshot(
&command.snapshot_types,
));
- let snapshot = snapshot_future.await.with_error_context(|error| {
- format!("{COMPONENT} (error: {error}) - failed to get snapshot")
- })?;
+ let snapshot = snapshot_future
+ .await
+ .with_error(|error| format!("{COMPONENT} (error: {error}) - failed to get snapshot"))?;
let zip_data = Bytes::from(snapshot.0);
let filename = format!("iggy_snapshot_{}.zip", Local::now().format("%Y%m%d_%H%M%S"));
diff --git a/core/server/src/http/topics.rs b/core/server/src/http/topics.rs
index 16dde7120..8fd543e45 100644
--- a/core/server/src/http/topics.rs
+++ b/core/server/src/http/topics.rs
@@ -29,7 +29,7 @@ use axum::extract::{Path, State};
use axum::http::StatusCode;
use axum::routing::{delete, get};
use axum::{Extension, Json, Router, debug_handler};
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::Identifier;
use iggy_common::Validatable;
use iggy_common::create_topic::CreateTopic;
@@ -95,7 +95,7 @@ async fn get_topic(
.permissioner
.borrow()
.get_topic(session.get_user_id(), numeric_stream_id, numeric_topic_id)
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - permission denied to get topic with ID: {topic_id} in stream with ID: {stream_id} for user with ID: {}",
session.get_user_id(),
@@ -135,7 +135,7 @@ async fn get_topics(
.permissioner
.borrow()
.get_topics(session.get_user_id(), numeric_stream_id)
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - permission denied to get topics in stream with ID: {stream_id} for user with ID: {}",
session.get_user_id(),
@@ -182,7 +182,7 @@ async fn create_topic(
));
future.await
}
- .with_error_context(|error| {
+ .with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to create topic, stream ID: {stream_id}")
})?;
@@ -225,7 +225,7 @@ async fn create_topic(
});
broadcast_future.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to broadcast topic events, stream ID: {stream_id}"
)
@@ -259,7 +259,7 @@ async fn create_topic(
);
future.await
}
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to apply create topic, stream ID: {stream_id}",
)
@@ -292,7 +292,7 @@ async fn update_topic(
command.compression_algorithm,
command.max_topic_size,
command.replication_factor,
- ).with_error_context(|error| {
+ ).with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to update topic, stream ID: {stream_id}, topic ID: {topic_id}"
)
@@ -342,7 +342,7 @@ async fn update_topic(
let future = SendWrapper::new(state.shard.shard().state
.apply(identity.user_id, &entry_command));
future.await
- }.with_error_context(|error| {
+ }.with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to apply update topic, stream ID: {stream_id}, topic ID: {topic_id}"
)
@@ -370,7 +370,7 @@ async fn delete_topic(
&identifier_topic_id,
));
future.await
- }.with_error_context(|error| {
+ }.with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to delete topic with ID: {topic_id} in stream with ID: {stream_id}",
)
@@ -407,7 +407,7 @@ async fn delete_topic(
&entry_command,
));
future.await
- }.with_error_context(|error| {
+ }.with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to apply delete topic, stream ID: {stream_id}, topic ID: {topic_id}"
)
@@ -435,7 +435,7 @@ async fn purge_topic(
&identifier_topic_id,
));
future.await
- }.with_error_context(|error| {
+ }.with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to purge topic, stream ID: {stream_id}, topic ID: {topic_id}"
)
@@ -469,7 +469,7 @@ async fn purge_topic(
&entry_command,
));
future.await
- }.with_error_context(|error| {
+ }.with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to apply purge topic, stream ID: {stream_id}, topic ID: {topic_id}"
)
diff --git a/core/server/src/http/users.rs b/core/server/src/http/users.rs
index 56c48bdaf..f47356781 100644
--- a/core/server/src/http/users.rs
+++ b/core/server/src/http/users.rs
@@ -37,7 +37,7 @@ use axum::extract::{Path, State};
use axum::http::StatusCode;
use axum::routing::{delete, get, post, put};
use axum::{Extension, Json, Router, debug_handler};
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::Identifier;
use iggy_common::IdentityInfo;
use iggy_common::Validatable;
@@ -94,7 +94,7 @@ async fn get_users(
let future = SendWrapper::new(state.shard.shard().get_users(&session));
future.await
}
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to get users, user ID: {}",
identity.user_id
@@ -127,7 +127,7 @@ async fn create_user(
command.status,
command.permissions.clone(),
)
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to create user, username: {}",
command.username
@@ -175,7 +175,7 @@ async fn create_user(
.state
.apply(identity.user_id, &entry_command),
);
- future.await.with_error_context(|error| {
+ future.await.with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to apply create user, username: {}",
username
@@ -208,7 +208,7 @@ async fn update_user(
command.username.clone(),
command.status,
)
- .with_error_context(|error| {
+ .with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to update user, user ID: {user_id}")
})?;
@@ -240,7 +240,7 @@ async fn update_user(
.state
.apply(identity.user_id, &entry_command),
);
- future.await.with_error_context(|error| {
+ future.await.with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to apply update user, username: {}",
username.unwrap()
@@ -267,7 +267,7 @@ async fn update_permissions(
.shard
.shard()
.update_permissions(&session, &command.user_id, command.permissions.clone())
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to update permissions, user ID: {user_id}"
)
@@ -299,7 +299,7 @@ async fn update_permissions(
.state
.apply(identity.user_id, &entry_command),
);
- future.await.with_error_context(|error| {
+ future.await.with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to apply update permissions, user ID: {user_id}"
)
@@ -330,7 +330,7 @@ async fn change_password(
&command.current_password,
&command.new_password,
)
- .with_error_context(|error| {
+ .with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to change password, user ID: {user_id}")
})?;
@@ -361,7 +361,7 @@ async fn change_password(
.state
.apply(identity.user_id, &entry_command),
);
- future.await.with_error_context(|error| {
+ future.await.with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to apply change password, user ID: {user_id}"
)
@@ -385,7 +385,7 @@ async fn delete_user(
.shard
.shard()
.delete_user(&session, &identifier_user_id)
- .with_error_context(|error| {
+ .with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to delete user with ID: {user_id}")
})?;
@@ -416,7 +416,7 @@ async fn delete_user(
.state
.apply(identity.user_id, &entry_command),
);
- future.await.with_error_context(|error| {
+ future.await.with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to apply delete user with ID: {user_id}")
})?;
}
@@ -435,7 +435,7 @@ async fn login_user(
.shard
.shard()
.login_user(&command.username, &command.password, None)
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to login, username: {}",
command.username
@@ -456,7 +456,7 @@ async fn logout_user(
.shard
.shard()
.logout_user(&session)
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to logout, user ID: {}",
identity.user_id
@@ -470,7 +470,7 @@ async fn logout_user(
.revoke_token(&identity.token_id, identity.token_expiry),
);
- revoke_token_future.await.with_error_context(|error| {
+ revoke_token_future.await.with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to revoke token, user ID: {}",
identity.user_id
@@ -490,9 +490,9 @@ async fn refresh_token(
let refresh_token_future =
SendWrapper::new(state.jwt_manager.refresh_token(&command.token));
- refresh_token_future.await.with_error_context(|error| {
- format!("{COMPONENT} (error: {error}) - failed to refresh token")
- })?
+ refresh_token_future
+ .await
+ .with_error(|error| format!("{COMPONENT} (error: {error}) - failed to refresh token"))?
};
Ok(Json(map_generated_access_token_to_identity_info(token)))
diff --git a/core/server/src/main.rs b/core/server/src/main.rs
index d2911b266..25ea594df 100644
--- a/core/server/src/main.rs
+++ b/core/server/src/main.rs
@@ -28,7 +28,7 @@ use anyhow::Result;
use clap::Parser;
use dashmap::DashMap;
use dotenvy::dotenv;
-use error_set::ErrContext;
+use err_trail::ErrContext;
use figlet_rs::FIGfont;
use iggy_common::{Aes256GcmEncryptor, EncryptorKind, IggyError};
use server::args::Args;
@@ -94,11 +94,9 @@ async fn main() -> Result<(), ServerError> {
// Load config and create directories.
// Remove `local_data` directory if run with `--fresh` flag.
let config_provider = config_provider::resolve(&args.config_provider)?;
- let config = load_config(&config_provider)
- .await
- .with_error_context(|error| {
- format!("{COMPONENT} (error: {error}) - failed to load config during bootstrap")
- })?;
+ let config = load_config(&config_provider).await.with_error(|error| {
+ format!("{COMPONENT} (error: {error}) - failed to load config during bootstrap")
+ })?;
if args.fresh {
let system_path = config.system.get_system_path();
if compio::fs::metadata(&system_path).await.is_ok() {
diff --git a/core/server/src/quic/quic_sender.rs b/core/server/src/quic/quic_sender.rs
index 6f81a704d..949222fe4 100644
--- a/core/server/src/quic/quic_sender.rs
+++ b/core/server/src/quic/quic_sender.rs
@@ -23,7 +23,7 @@ use compio::BufResult;
use compio::buf::IoBufMut;
use compio::io::AsyncReadExt;
use compio_quic::{RecvStream, SendStream};
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::IggyError;
use tracing::{debug, error};
diff --git a/core/server/src/quic/quic_server.rs b/core/server/src/quic/quic_server.rs
index 449e5c35f..d70a30877 100644
--- a/core/server/src/quic/quic_server.rs
+++ b/core/server/src/quic/quic_server.rs
@@ -26,7 +26,7 @@ use anyhow::Result;
use compio_quic::{
Endpoint, EndpointConfig, IdleTimeout, ServerBuilder, ServerConfig, TransportConfig, VarInt,
};
-use error_set::ErrContext;
+use err_trail::ErrContext;
use rustls::crypto::ring::default_provider;
use rustls::pki_types::{CertificateDer, PrivateKeyDer};
use std::fs::File;
@@ -145,7 +145,7 @@ fn configure_quic(config: &QuicConfig) -> Result<ServerConfig, QuicError> {
};
let builder = ServerBuilder::new_with_single_cert(certificates, private_key)
- .with_error_context(|error| {
+ .with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to create QUIC server builder")
})
.map_err(|_| QuicError::ConfigCreationError)?;
diff --git a/core/server/src/server_error.rs b/core/server/src/server_error.rs
index 70ce206b2..7ee74803d 100644
--- a/core/server/src/server_error.rs
+++ b/core/server/src/server_error.rs
@@ -34,7 +34,7 @@ error_set!(
#[display("Read error")]
ReadToEndError(ReadError)
- };
+ }
ConfigError := {
#[display("Invalid configuration provider: {}", provider_type)]
diff --git a/core/server/src/shard/system/clients.rs b/core/server/src/shard/system/clients.rs
index cce06384a..1c1a0e66c 100644
--- a/core/server/src/shard/system/clients.rs
+++ b/core/server/src/shard/system/clients.rs
@@ -20,7 +20,7 @@ use super::COMPONENT;
use crate::shard::IggyShard;
use crate::streaming::clients::client_manager::Client;
use crate::streaming::session::Session;
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::IggyError;
use iggy_common::{Identifier, TransportProtocol};
use std::net::SocketAddr;
diff --git a/core/server/src/shard/system/consumer_groups.rs b/core/server/src/shard/system/consumer_groups.rs
index d5d5dd66d..6c7e0be71 100644
--- a/core/server/src/shard/system/consumer_groups.rs
+++ b/core/server/src/shard/system/consumer_groups.rs
@@ -28,7 +28,7 @@ use crate::streaming::topics;
use crate::streaming::topics::consumer_group;
use crate::streaming::topics::consumer_group::MEMBERS_CAPACITY;
use arcshift::ArcShift;
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::Identifier;
use iggy_common::IggyError;
use slab::Slab;
@@ -54,7 +54,7 @@ impl IggyShard {
session.get_user_id(),
stream_id,
topic_id,
- ).with_error_context(|error| format!("{COMPONENT} (error: {error}) - permission denied to create consumer group for user {} on stream ID: {}, topic ID: {}", session.get_user_id(), stream_id, topic_id))?;
+ ).with_error(|error| format!("{COMPONENT} (error: {error}) - permission denied to create consumer group for user {} on stream ID: {}, topic ID: {}", session.get_user_id(), stream_id, topic_id))?;
}
let cg = self.create_and_insert_consumer_group_mem(stream_id, topic_id, name);
Ok(cg)
@@ -115,7 +115,7 @@ impl IggyShard {
session.get_user_id(),
stream_id,
topic_id,
- ).with_error_context(|error| format!("{COMPONENT} (error: {error}) - permission denied to delete consumer group for user {} on stream ID: {}, topic ID: {}", session.get_user_id(), stream_id, topic_id))?;
+ ).with_error(|error| format!("{COMPONENT} (error: {error}) - permission denied to delete consumer group for user {} on stream ID: {}, topic ID: {}", session.get_user_id(), stream_id, topic_id))?;
}
let cg = self.delete_consumer_group_base(stream_id, topic_id, group_id);
Ok(cg)
@@ -183,7 +183,7 @@ impl IggyShard {
session.get_user_id(),
stream_id,
topic_id,
- ).with_error_context(|error| format!("{COMPONENT} (error: {error}) - permission denied to join consumer group for user {} on stream ID: {}, topic ID: {}", session.get_user_id(), stream_id, topic_id))?;
+ ).with_error(|error| format!("{COMPONENT} (error: {error}) - permission denied to join consumer group for user {} on stream ID: {}, topic ID: {}", session.get_user_id(), stream_id, topic_id))?;
}
let client_id = session.client_id;
self.streams.with_consumer_group_by_id_mut(
@@ -213,7 +213,7 @@ impl IggyShard {
topic_id_value,
group_id_value,
)
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to make client join consumer group for client ID: {}",
session.client_id
@@ -242,7 +242,7 @@ impl IggyShard {
session.get_user_id(),
stream_id,
topic_id,
- ).with_error_context(|error| format!("{COMPONENT} (error: {error}) - permission denied to leave consumer group for user {} on stream ID: {}, topic ID: {}", session.get_user_id(), stream_id, topic_id))?;
+ ).with_error(|error| format!("{COMPONENT} (error: {error}) - permission denied to leave consumer group for user {} on stream ID: {}, topic ID: {}", session.get_user_id(), stream_id, topic_id))?;
}
self.streams.with_consumer_group_by_id_mut(
stream_id,
@@ -270,7 +270,7 @@ impl IggyShard {
stream_id_value,
topic_id_value,
group_id_value,
- ).with_error_context(|error| format!("{COMPONENT} (error: {error}) - failed to make client leave consumer group for client ID: {}", session.client_id))?;
+ ).with_error(|error| format!("{COMPONENT} (error: {error}) - failed to make client leave consumer group for client ID: {}", session.client_id))?;
Ok(())
}
@@ -300,7 +300,7 @@ impl IggyShard {
stream_id_value,
topic_id_value,
group_id_value,
- ).with_error_context(|error| format!("{COMPONENT} (error: {error}) - failed to make client leave consumer group for client ID: {}", client_id))?;
+ ).with_error(|error| format!("{COMPONENT} (error: {error}) - failed to make client leave consumer group for client ID: {}", client_id))?;
Ok(())
}
}
diff --git a/core/server/src/shard/system/consumer_offsets.rs b/core/server/src/shard/system/consumer_offsets.rs
index f49cd7d30..6f488e8da 100644
--- a/core/server/src/shard/system/consumer_offsets.rs
+++ b/core/server/src/shard/system/consumer_offsets.rs
@@ -22,7 +22,7 @@ use crate::{
shard::IggyShard,
streaming::{partitions, polling_consumer::PollingConsumer, session::Session, streams, topics},
};
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::{Consumer, ConsumerOffsetInfo, Identifier, IggyError};
impl IggyShard {
@@ -48,7 +48,7 @@ impl IggyShard {
session.get_user_id(),
stream_id,
topic_id
- ).with_error_context(|error| {
+ ).with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - permission denied to store consumer offset for user with ID: {}, consumer: {consumer} in topic with ID: {topic_id} and stream with ID: {stream_id}",
session.get_user_id(),
@@ -99,7 +99,7 @@ impl IggyShard {
session.get_user_id(),
stream_id,
topic_id
- ).with_error_context(|error| {
+ ).with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - permission denied to get consumer offset for user with ID: {}, consumer: {consumer} in topic with ID: {topic_id} and stream with ID: {stream_id}",
session.get_user_id()
@@ -155,7 +155,7 @@ impl IggyShard {
session.get_user_id(),
stream_id,
topic_id
- ).with_error_context(|error| {
+ ).with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - permission denied to delete consumer offset for user with ID: {}, consumer: {consumer} in topic with ID: {topic_id} and stream with ID: {stream_id}",
session.get_user_id(),
@@ -238,7 +238,7 @@ impl IggyShard {
match polling_consumer {
PollingConsumer::Consumer(id, _) => {
self.streams
- .with_partition_by_id(stream_id, topic_id, partition_id, partitions::helpers::delete_consumer_offset(*id)).with_error_context(|error| {
+ .with_partition_by_id(stream_id, topic_id, partition_id, partitions::helpers::delete_consumer_offset(*id)).with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to delete consumer offset for consumer with ID: {id} in topic with ID: {topic_id} and stream with ID: {stream_id}",
)
@@ -246,7 +246,7 @@ impl IggyShard {
}
PollingConsumer::ConsumerGroup(_, id) => {
self.streams
- .with_partition_by_id(stream_id, topic_id, partition_id, partitions::helpers::delete_consumer_group_member_offset(*id)).with_error_context(|error| {
+ .with_partition_by_id(stream_id, topic_id, partition_id, partitions::helpers::delete_consumer_group_member_offset(*id)).with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to delete consumer group member offset for member with ID: {id} in topic with ID: {topic_id} and stream with ID: {stream_id}",
)
diff --git a/core/server/src/shard/system/messages.rs b/core/server/src/shard/system/messages.rs
index 8294f427f..a80db6af3 100644
--- a/core/server/src/shard/system/messages.rs
+++ b/core/server/src/shard/system/messages.rs
@@ -28,7 +28,7 @@ use crate::streaming::segments::{IggyIndexesMut, IggyMessagesBatchMut, IggyMessa
use crate::streaming::traits::MainOps;
use crate::streaming::utils::PooledBuffer;
use crate::streaming::{partitions, streams, topics};
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::{
BytesSerializable, Consumer, EncryptorKind, IGGY_MESSAGE_HEADER_SIZE, Identifier, IggyError,
Partitioning, PartitioningKind, PollingKind, PollingStrategy,
@@ -63,7 +63,7 @@ impl IggyShard {
numeric_stream_id,
numeric_topic_id,
)
- .with_error_context(|error| {
+ .with_error(|error| {
format!("{COMPONENT} (error: {error}) - permission denied to append messages for user {} on stream ID: {}, topic ID: {}", user_id, numeric_stream_id as u32, numeric_topic_id as u32)
})?;
@@ -166,7 +166,7 @@ impl IggyShard {
self.permissioner
.borrow()
.poll_messages(user_id, numeric_stream_id, numeric_topic_id)
- .with_error_context(|error| format!(
+ .with_error(|error| format!(
"{COMPONENT} (error: {error}) - permission denied to poll messages for user {} on stream ID: {}, topic ID: {}",
user_id,
stream_id,
@@ -287,7 +287,7 @@ impl IggyShard {
self.permissioner
.borrow()
.append_messages(user_id, numeric_stream_id, numeric_topic_id)
- .with_error_context(|error| {
+ .with_error(|error| {
format!("{COMPONENT} (error: {error}) - permission denied to flush unsaved buffer for user {} on stream ID: {}, topic ID: {}", user_id, numeric_stream_id as u32, numeric_topic_id as u32)
})?;
diff --git a/core/server/src/shard/system/partitions.rs b/core/server/src/shard/system/partitions.rs
index 5303bb7b1..d561581d7 100644
--- a/core/server/src/shard/system/partitions.rs
+++ b/core/server/src/shard/system/partitions.rs
@@ -32,7 +32,7 @@ use crate::streaming::segments::storage::create_segment_storage;
use crate::streaming::session::Session;
use crate::streaming::streams;
use crate::streaming::topics;
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::Identifier;
use iggy_common::IggyError;
use tracing::info;
@@ -52,7 +52,7 @@ impl IggyShard {
_ => return Err(IggyError::InvalidCommand),
};
- result.with_error_context(|error| {
+ result.with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - permission denied to {operation} partitions for user {} on stream ID: {}, topic ID: {}",
session.get_user_id(),
diff --git a/core/server/src/shard/system/personal_access_tokens.rs b/core/server/src/shard/system/personal_access_tokens.rs
index b053cdb99..301b18f4b 100644
--- a/core/server/src/shard/system/personal_access_tokens.rs
+++ b/core/server/src/shard/system/personal_access_tokens.rs
@@ -114,7 +114,7 @@ impl IggyShard {
.insert(token_hash, personal_access_token);
info!("Created personal access token: {name} for user with ID: {user_id}.");
Ok(())
- }).with_error_context(|error| {
+ }).with_error(|error| {
format!("{COMPONENT} create PAT (error: {error}) - failed to access user with id: {user_id}")
})??;
Ok(())
@@ -154,7 +154,7 @@ impl IggyShard {
info!("Deleting personal access token: {name} for user with ID: {user_id}...");
user.personal_access_tokens.remove(&token);
Ok(())
- }).with_error_context(|error| {
+ }).with_error(|error| {
format!(
"{COMPONENT} delete PAT (error: {error}) - failed to access user with id: {user_id}"
)
diff --git a/core/server/src/shard/system/storage.rs b/core/server/src/shard/system/storage.rs
index a098e4927..0b89f5da3 100644
--- a/core/server/src/shard/system/storage.rs
+++ b/core/server/src/shard/system/storage.rs
@@ -24,7 +24,7 @@ use crate::streaming::utils::file;
use anyhow::Context;
use compio::buf::IoBuf;
use compio::io::AsyncReadAtExt;
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::IggyError;
use std::sync::Arc;
use tracing::info;
@@ -68,7 +68,7 @@ impl FileSystemInfoStorage {
.await
.into();
result
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} Failed to read system info from file at path: {} (error: {error})",
self.path
diff --git a/core/server/src/shard/system/streams.rs b/core/server/src/shard/system/streams.rs
index ad437b66a..84b82e0e4 100644
--- a/core/server/src/shard/system/streams.rs
+++ b/core/server/src/shard/system/streams.rs
@@ -22,7 +22,7 @@ use crate::slab::traits_ext::{DeleteCell, EntityMarker, InsertCell};
use crate::streaming::session::Session;
use crate::streaming::streams::storage::{create_stream_file_hierarchy, delete_stream_from_disk};
use crate::streaming::streams::{self, stream};
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::{Identifier, IggyError};
impl IggyShard {
@@ -72,7 +72,7 @@ impl IggyShard {
self.permissioner
.borrow()
.update_stream(session.get_user_id(), id)
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to update stream, user ID: {}, stream ID: {}",
session.get_user_id(),
@@ -137,7 +137,7 @@ impl IggyShard {
self.permissioner
.borrow()
.delete_stream(session.get_user_id(), stream_id)
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - permission denied to delete stream for user {}, stream ID: {}",
session.get_user_id(),
@@ -186,7 +186,7 @@ impl IggyShard {
self.permissioner
.borrow()
.purge_stream(session.get_user_id(), stream_id)
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - permission denied to purge stream for user {}, stream ID: {}",
session.get_user_id(),
diff --git a/core/server/src/shard/system/topics.rs b/core/server/src/shard/system/topics.rs
index c2420dce6..0dff07cb6 100644
--- a/core/server/src/shard/system/topics.rs
+++ b/core/server/src/shard/system/topics.rs
@@ -23,7 +23,7 @@ use crate::streaming::session::Session;
use crate::streaming::topics::storage::{create_topic_file_hierarchy, delete_topic_from_disk};
use crate::streaming::topics::topic::{self};
use crate::streaming::{partitions, streams, topics};
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::{CompressionAlgorithm, Identifier, IggyError, IggyExpiry, MaxTopicSize};
use std::str::FromStr;
use tracing::info;
@@ -47,7 +47,7 @@ impl IggyShard {
self.permissioner
.borrow()
.create_topic(session.get_user_id(), numeric_stream_id)
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - permission denied to create topic with name: {name} in stream with ID: {stream_id} for user with ID: {}",
session.get_user_id(),
@@ -116,7 +116,7 @@ impl IggyShard {
session.get_user_id(),
stream_id_val,
topic_id_val
- ).with_error_context(|error| {
+ ).with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - permission denied to update topic for user with id: {}, stream ID: {}, topic ID: {}",
session.get_user_id(),
@@ -205,7 +205,7 @@ impl IggyShard {
self.permissioner
.borrow()
.delete_topic(session.get_user_id(), numeric_stream_id, numeric_topic_id)
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - permission denied to delete topic with ID: {topic_id} in stream with ID: {stream_id} for user with ID: {}",
session.get_user_id(),
@@ -279,7 +279,7 @@ impl IggyShard {
session.get_user_id(),
stream_id,
topic_id
- ).with_error_context(|error| {
+ ).with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - permission denied to purge topic with ID: {topic_id} in stream with ID: {stream_id} for user with ID: {}",
session.get_user_id(),
diff --git a/core/server/src/shard/system/users.rs b/core/server/src/shard/system/users.rs
index c6541d0fc..634551e39 100644
--- a/core/server/src/shard/system/users.rs
+++ b/core/server/src/shard/system/users.rs
@@ -21,7 +21,7 @@ use crate::shard::IggyShard;
use crate::streaming::session::Session;
use crate::streaming::users::user::User;
use crate::streaming::utils::crypto;
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::Identifier;
use iggy_common::IggyError;
use iggy_common::Permissions;
@@ -43,7 +43,7 @@ impl IggyShard {
let session_user_id = session.get_user_id();
if user.id != session_user_id {
- self.permissioner.borrow().get_user(session_user_id).with_error_context(|error| {
+ self.permissioner.borrow().get_user(session_user_id).with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - permission denied to get user with ID: {user_id} for current user with ID: {session_user_id}"
)
@@ -67,7 +67,7 @@ impl IggyShard {
self.permissioner
.borrow()
.get_users(session.get_user_id())
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - permission denied to get users for user with id: {}",
session.get_user_id()
@@ -88,7 +88,7 @@ impl IggyShard {
self.permissioner
.borrow()
.create_user(session.get_user_id())
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - permission denied to create user for user with id: {}",
session.get_user_id()
@@ -107,7 +107,7 @@ impl IggyShard {
let user_id = self.create_user_base(username, password, status, permissions)?;
self.get_user(&(user_id as u32).try_into()?)
- .with_error_context(|error| {
+ .with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to get user with id: {user_id}")
})
}
@@ -152,7 +152,7 @@ impl IggyShard {
self.permissioner
.borrow()
.delete_user(session.get_user_id())
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - permission denied to delete user for user with id: {}",
session.get_user_id()
@@ -167,7 +167,7 @@ impl IggyShard {
}
fn delete_user_base(&self, user_id: &Identifier) -> Result<User, IggyError> {
- let user = self.get_user(user_id).with_error_context(|error| {
+ let user = self.get_user(user_id).with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to get user with id: {user_id}")
})?;
@@ -188,7 +188,7 @@ impl IggyShard {
.delete_permissions_for_user(user_u32_id);
self.client_manager
.delete_clients_for_user(user_u32_id)
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to delete clients for user with ID: {user_u32_id}"
)
@@ -208,7 +208,7 @@ impl IggyShard {
self.permissioner
.borrow()
.update_user(session.get_user_id())
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - permission denied to update user for user with id: {}",
session.get_user_id()
@@ -249,13 +249,13 @@ impl IggyShard {
if let Some(status) = status {
self.users.with_user_mut(&numeric_user_id, |user| {
user.status = status;
- }).with_error_context(|error| {
+ }).with_error(|error| {
format!("{COMPONENT} update user (error: {error}) - failed to update user with id: {user_id}")
})?;
}
self.get_user(&numeric_user_id)
- .with_error_context(|error| {
+ .with_error(|error| {
format!("{COMPONENT} update user (error: {error}) - failed to get updated user with id: {user_id}")
})
}
@@ -272,12 +272,12 @@ impl IggyShard {
self.permissioner
.borrow()
.update_permissions(session.get_user_id())
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - permission denied to update permissions for user with id: {}", session.get_user_id()
)
})?;
- let user: User = self.get_user(user_id).with_error_context(|error| {
+ let user: User = self.get_user(user_id).with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to get user with id: {user_id}")
})?;
if user.is_root() {
@@ -302,7 +302,7 @@ impl IggyShard {
user_id: &Identifier,
permissions: Option<Permissions>,
) -> Result<(), IggyError> {
- let user: User = self.get_user(user_id).with_error_context(|error| {
+ let user: User = self.get_user(user_id).with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to get user with id: {user_id}")
})?;
@@ -312,7 +312,7 @@ impl IggyShard {
self.users.with_user_mut(user_id, |user| {
user.permissions = permissions;
- }).with_error_context(|error| {
+ }).with_error(|error| {
format!(
"{COMPONENT} update user permissions (error: {error}) - failed to update permissions for user with id: {user_id}"
)
@@ -329,7 +329,7 @@ impl IggyShard {
self.ensure_authenticated(session)?;
{
- let user = self.get_user(user_id).with_error_context(|error| {
+ let user = self.get_user(user_id).with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to get user with id: {user_id}")
})?;
let session_user_id = session.get_user_id();
@@ -368,7 +368,7 @@ impl IggyShard {
}
user.password = crypto::hash_password(new_password);
Ok(())
- }).with_error_context(|error| {
+ }).with_error(|error| {
format!("{COMPONENT} change password (error: {error}) - failed to change password for user with id: {user_id}")
})?
}
@@ -427,7 +427,7 @@ impl IggyShard {
session.set_user_id(user.id);
self.client_manager
.set_user_id(session.client_id, user.id)
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to set user_id to client, client ID: {}, user ID: {}",
session.client_id, user.id
diff --git a/core/server/src/shard/tasks/oneshot/config_writer.rs b/core/server/src/shard/tasks/oneshot/config_writer.rs
index e23e54393..4c56b98b7 100644
--- a/core/server/src/shard/tasks/oneshot/config_writer.rs
+++ b/core/server/src/shard/tasks/oneshot/config_writer.rs
@@ -1,6 +1,6 @@
use crate::shard::IggyShard;
use compio::io::AsyncWriteAtExt;
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::IggyError;
use std::rc::Rc;
use tracing::info;
@@ -30,7 +30,7 @@ async fn write_config(shard: Rc<IggyShard>) -> Result<(), IggyError> {
.recv()
.await
.map_err(|_| IggyError::CannotWriteToFile)
- .with_error_context(
+ .with_error(
|_| "config_writer: notification channel closed before all servers bound",
)?;
@@ -77,7 +77,7 @@ async fn write_config(shard: Rc<IggyShard>) -> Result<(), IggyError> {
let config_path = format!("{runtime_path}/current_config.toml");
let content = toml::to_string(¤t_config)
.map_err(|_| IggyError::CannotWriteToFile)
- .with_error_context(|_| "config_writer: cannot serialize current_config")?;
+ .with_error(|_| "config_writer: cannot serialize current_config")?;
let mut file = compio::fs::OpenOptions::new()
.write(true)
@@ -86,22 +86,20 @@ async fn write_config(shard: Rc<IggyShard>) -> Result<(), IggyError> {
.open(&config_path)
.await
.map_err(|_| IggyError::CannotWriteToFile)
- .with_error_context(|_| {
- format!("config_writer: failed to open current config at {config_path}")
- })?;
+ .with_error(|_| format!("config_writer: failed to open current config at {config_path}"))?;
file.write_all_at(content.into_bytes(), 0)
.await
.0
.map_err(|_| IggyError::CannotWriteToFile)
- .with_error_context(|_| {
+ .with_error(|_| {
format!("config_writer: failed to write current config to {config_path}")
})?;
file.sync_all()
.await
.map_err(|_| IggyError::CannotWriteToFile)
- .with_error_context(|_| {
+ .with_error(|_| {
format!("config_writer: failed to fsync current config to {config_path}")
})?;
diff --git a/core/server/src/shard/transmission/id.rs b/core/server/src/shard/transmission/id.rs
index 0cbb6b96b..ad16ff9ad 100644
--- a/core/server/src/shard/transmission/id.rs
+++ b/core/server/src/shard/transmission/id.rs
@@ -1,9 +1,5 @@
-<<<<<<<< HEAD:core/server/src/shard/transmission/id.rs
/* Licensed to the Apache Software Foundation (ASF) under one
-========
-/**
* Licensed to the Apache Software Foundation (ASF) under one
->>>>>>>> master:foreign/node/src/examples/utils.ts
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
@@ -21,7 +17,6 @@
* under the License.
*/
-<<<<<<<< HEAD:core/server/src/shard/transmission/id.rs
use std::ops::Deref;
// TODO: Maybe pad to cache line size?
@@ -47,22 +42,3 @@ impl Deref for ShardId {
&self.id
}
}
-========
-
-import { Client } from '../index.js';
-import { getIggyAddress } from '../tcp.sm.utils.js';
-
-
-export const getClient = () => {
- const [host, port] = getIggyAddress();
- const credentials = { username: 'iggy', password: 'iggy' };
-
- const opt = {
- transport: 'TCP' as const,
- options: { host, port },
- credentials
- };
-
- return new Client(opt);
-};
->>>>>>>> master:foreign/node/src/examples/utils.ts
diff --git a/core/server/src/slab/streams.rs b/core/server/src/slab/streams.rs
index 6cac24828..4786f1788 100644
--- a/core/server/src/slab/streams.rs
+++ b/core/server/src/slab/streams.rs
@@ -38,7 +38,7 @@ use crate::{
},
};
use ahash::AHashMap;
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::{Identifier, IggyError, IggyTimestamp, PollingKind};
use slab::Slab;
use std::{
@@ -757,7 +757,7 @@ impl Streams {
segment_start_offset,
)
.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!("Failed to load messages from disk, start offset: {offset}, count: {disk_count}, error: {error}")
})?;
@@ -852,11 +852,11 @@ impl Streams {
.as_ref()
.load_messages_from_disk(indexes_to_read)
.await
- .with_error_context(|error| format!("Failed to load messages from disk: {error}"))?;
+ .with_error(|error| format!("Failed to load messages from disk: {error}"))?;
batch
.validate_checksums_and_offsets(start_offset)
- .with_error_context(|error| {
+ .with_error(|error| {
format!("Failed to validate messages read from disk! error: {error}")
})?;
@@ -1081,7 +1081,7 @@ impl Streams {
.as_ref()
.load_messages_from_disk(indexes_to_read)
.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!("Failed to load messages from disk by timestamp: {error}")
})?;
@@ -1276,7 +1276,7 @@ impl Streams {
.as_ref()
.save_batch_set(batches)
.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"Failed to save batch of {batch_count} messages \
({batch_size} bytes) to stream ID: {stream_id}, topic ID: {topic_id}, partition ID: {partition_id}. {error}",
@@ -1294,7 +1294,7 @@ impl Streams {
.as_ref()
.save_indexes(unsaved_indexes_slice)
.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!("Failed to save index of {indexes_len} indexes to stream ID: {stream_id}, topic ID: {topic_id} {partition_id}. {error}",)
})?;
diff --git a/core/server/src/state/file.rs b/core/server/src/state/file.rs
index 46f930765..5ea72192d 100644
--- a/core/server/src/state/file.rs
+++ b/core/server/src/state/file.rs
@@ -23,7 +23,7 @@ use crate::streaming::utils::file;
use crate::versioning::SemanticVersion;
use bytes::{Buf, BufMut, Bytes, BytesMut};
use compio::io::AsyncReadExt;
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::BytesSerializable;
use iggy_common::EncryptorKind;
use iggy_common::IggyByteSize;
@@ -217,7 +217,7 @@ impl FileState {
let (result, context) = cursor.read_exact(context).await.into();
result
- .with_error_context(|error| format!("{FILE_STATE_PARSE_ERROR} code. {error}"))
+ .with_error(|error| format!("{FILE_STATE_PARSE_ERROR} code. {error}"))
.map_err(|_| IggyError::CannotReadFile)?;
let context = context.freeze();
total_size += context_length as u64;
@@ -238,7 +238,7 @@ impl FileState {
command.put_bytes(0, command_length);
let (result, command) = cursor.read_exact(command).await.into();
result
- .with_error_context(|error| format!("{FILE_STATE_PARSE_ERROR} command. {error}"))
+ .with_error(|error| format!("{FILE_STATE_PARSE_ERROR} command. {error}"))
.map_err(|_| IggyError::CannotReadFile)?;
total_size += command_length as u64;
let command_payload;
diff --git a/core/server/src/state/system.rs b/core/server/src/state/system.rs
index 0fe9196bf..b3213c51b 100644
--- a/core/server/src/state/system.rs
+++ b/core/server/src/state/system.rs
@@ -100,7 +100,7 @@ pub struct ConsumerGroupState {
impl SystemState {
pub async fn load(state: FileState) -> Result<Self, IggyError> {
- let mut state_entries = state.init().await.with_error_context(|error| {
+ let mut state_entries = state.init().await.with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to initialize state entries")
})?;
@@ -132,22 +132,20 @@ impl SystemState {
command
}))
.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to apply create user command, username: {}",
root.username
)
})?;
- state_entries = state.init().await.with_error_context(|error| {
+ state_entries = state.init().await.with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to initialize state entries")
})?;
}
- let system_state = Self::init(state_entries)
- .await
- .with_error_context(|error| {
- format!("{COMPONENT} (error: {error}) - failed to initialize system state")
- })?;
+ let system_state = Self::init(state_entries).await.with_error(|error| {
+ format!("{COMPONENT} (error: {error}) - failed to initialize system state")
+ })?;
Ok(system_state)
}
diff --git a/core/server/src/streaming/partitions/helpers.rs b/core/server/src/streaming/partitions/helpers.rs
index d2a056008..f8771ae20 100644
--- a/core/server/src/streaming/partitions/helpers.rs
+++ b/core/server/src/streaming/partitions/helpers.rs
@@ -1,4 +1,4 @@
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::{ConsumerOffsetInfo, Identifier, IggyByteSize, IggyError};
use std::{
ops::AsyncFnOnce,
@@ -347,9 +347,7 @@ pub async fn load_messages_from_disk_by_timestamp(
.expect("Messages reader not initialized")
.load_messages_from_disk(indexes_to_read)
.await
- .with_error_context(|error| {
- format!("Failed to load messages from disk by timestamp: {error}")
- })?;
+ .with_error(|error| format!("Failed to load messages from disk by timestamp: {error}"))?;
Ok(IggyMessagesBatchSet::from(batch))
}
@@ -478,7 +476,7 @@ pub fn persist_batch(
.expect("Messages writer not initialized")
.save_batch_set(batches)
.await
- .with_error_context(|error| {
+ .with_error(|error| {
let segment = log.active_segment();
format!(
"Failed to save batch of {batch_count} messages \
@@ -494,7 +492,7 @@ pub fn persist_batch(
.expect("Index writer not initialized")
.save_indexes(unsaved_indexes_slice)
.await
- .with_error_context(|error| {
+ .with_error(|error| {
let segment = log.active_segment();
format!("Failed to save index of {len} indexes to {segment}. {error}",)
})?;
diff --git a/core/server/src/streaming/partitions/segments.rs b/core/server/src/streaming/partitions/segments.rs
index 78d10bcf2..2a456cb35 100644
--- a/core/server/src/streaming/partitions/segments.rs
+++ b/core/server/src/streaming/partitions/segments.rs
@@ -79,7 +79,7 @@ impl Partition {
self.messages_count.clone(),
true,
);
- new_segment.open().await.with_error_context(|error| {
+ new_segment.open().await.with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to persist new segment: {new_segment}",)
})?;
self.segments.push(new_segment);
diff --git a/core/server/src/streaming/partitions/storage.rs b/core/server/src/streaming/partitions/storage.rs
index 236bd2622..7e0236573 100644
--- a/core/server/src/streaming/partitions/storage.rs
+++ b/core/server/src/streaming/partitions/storage.rs
@@ -7,7 +7,7 @@ use compio::{
fs::{self, OpenOptions, create_dir_all},
io::AsyncWriteAtExt,
};
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::{ConsumerKind, IggyError};
use std::{io::Read, path::Path, sync::atomic::AtomicU64};
use tracing::{error, trace};
@@ -182,7 +182,7 @@ pub fn load_consumer_offsets(
let path = path.unwrap().to_string();
let consumer_id = consumer_id.unwrap();
let file = std::fs::File::open(&path)
- .with_error_context(|error| {
+ .with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to open offset file, path: {path}")
})
.map_err(|_| IggyError::CannotReadFile)?;
@@ -190,7 +190,7 @@ pub fn load_consumer_offsets(
let mut offset = [0; 8];
cursor
.get_mut().read_exact(&mut offset)
- .with_error_context(|error| {
+ .with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to read consumer offset from file, path: {path}")
})
.map_err(|_| IggyError::CannotReadFile)?;
diff --git a/core/server/src/streaming/persistence/persister.rs b/core/server/src/streaming/persistence/persister.rs
index 8a960275f..81394ad01 100644
--- a/core/server/src/streaming/persistence/persister.rs
+++ b/core/server/src/streaming/persistence/persister.rs
@@ -21,7 +21,7 @@ use crate::streaming::utils::file;
use compio::buf::IoBuf;
use compio::fs::remove_file;
use compio::io::AsyncWriteAtExt;
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::IggyError;
use std::fmt::Debug;
@@ -68,7 +68,7 @@ impl FilePersister {
file.write_all_at(bytes, position)
.await
.0
- .with_error_context(|error| {
+ .with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to write data to file: {path}")
})
.map_err(|_| IggyError::CannotWriteToFile)?;
@@ -86,7 +86,7 @@ impl FilePersister {
file.write_all_at(bytes, position)
.await
.0
- .with_error_context(|error| {
+ .with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to write data to file: {path}")
})
.map_err(|_| IggyError::CannotWriteToFile)?;
@@ -118,7 +118,7 @@ impl FileWithSyncPersister {
file.write_all_at(bytes, position)
.await
.0
- .with_error_context(|error| {
+ .with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to write data to file: {path}")
})
.map_err(|_| IggyError::CannotWriteToFile)?;
@@ -144,7 +144,7 @@ impl FileWithSyncPersister {
file.write_all_at(bytes, position)
.await
.0
- .with_error_context(|error| {
+ .with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to write data to file: {path}")
})
.map_err(|_| IggyError::CannotWriteToFile)?;
diff --git a/core/server/src/streaming/segments/indexes/index_reader.rs b/core/server/src/streaming/segments/indexes/index_reader.rs
index d9f0a2e47..f37862beb 100644
--- a/core/server/src/streaming/segments/indexes/index_reader.rs
+++ b/core/server/src/streaming/segments/indexes/index_reader.rs
@@ -24,7 +24,7 @@ use compio::{
fs::{File, OpenOptions},
io::AsyncReadAtExt,
};
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::{INDEX_SIZE, IggyError, IggyIndex, IggyIndexView};
use std::{
io::ErrorKind,
diff --git a/core/server/src/streaming/segments/indexes/index_writer.rs b/core/server/src/streaming/segments/indexes/index_writer.rs
index 94e7a99aa..c0b7d0eef 100644
--- a/core/server/src/streaming/segments/indexes/index_writer.rs
+++ b/core/server/src/streaming/segments/indexes/index_writer.rs
@@ -19,7 +19,7 @@
use compio::fs::File;
use compio::fs::OpenOptions;
use compio::io::AsyncWriteAtExt;
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::INDEX_SIZE;
use iggy_common::IggyError;
use std::rc::Rc;
@@ -99,7 +99,7 @@ impl IndexWriter {
.write_all_at(indexes, position)
.await
.0
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"Failed to write {} indexes to file: {}. {error}",
count, self.file_path
diff --git a/core/server/src/streaming/segments/messages/messages_reader.rs b/core/server/src/streaming/segments/messages/messages_reader.rs
index 0f650e467..963510a60 100644
--- a/core/server/src/streaming/segments/messages/messages_reader.rs
+++ b/core/server/src/streaming/segments/messages/messages_reader.rs
@@ -22,7 +22,7 @@ use bytes::BytesMut;
use compio::buf::{IntoInner, IoBuf};
use compio::fs::{File, OpenOptions};
use compio::io::AsyncReadAtExt;
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::IggyError;
use std::rc::Rc;
use std::{
@@ -52,9 +52,7 @@ impl MessagesReader {
.read(true)
.open(file_path)
.await
- .with_error_context(|error| {
- format!("Failed to open messages file: {file_path}. {error}")
- })
+ .with_error(|error| format!("Failed to open messages file: {file_path}. {error}"))
.map_err(|_| IggyError::CannotReadFile)?;
// posix_fadvise() doesn't exist on MacOS
diff --git a/core/server/src/streaming/segments/messages/messages_writer.rs b/core/server/src/streaming/segments/messages/messages_writer.rs
index a5e43f55c..b0e48badc 100644
--- a/core/server/src/streaming/segments/messages/messages_writer.rs
+++ b/core/server/src/streaming/segments/messages/messages_writer.rs
@@ -18,7 +18,7 @@
use crate::streaming::segments::{IggyMessagesBatchSet, messages::write_batch};
use compio::fs::{File, OpenOptions};
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::{IggyByteSize, IggyError};
use std::{
rc::Rc,
@@ -55,9 +55,7 @@ impl MessagesWriter {
.write(true)
.open(file_path)
.await
- .with_error_context(|err| {
- format!("Failed to open messages file: {file_path}, error: {err}")
- })
+ .with_error(|err| format!("Failed to open messages file: {file_path}, error: {err}"))
.map_err(|_| IggyError::CannotReadFile)?;
if file_exists {
@@ -107,7 +105,7 @@ impl MessagesWriter {
let file = &self.file;
write_batch(file, position, batch_set)
.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"Failed to write batch to messages file: {}. {error}",
self.file_path
@@ -136,7 +134,7 @@ impl MessagesWriter {
self.file
.sync_all()
.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!("Failed to fsync messages file: {}. {error}", self.file_path)
})
.map_err(|_| IggyError::CannotWriteToFile)?;
diff --git a/core/server/src/tcp/tcp_listener.rs b/core/server/src/tcp/tcp_listener.rs
index c20993983..27653b278 100644
--- a/core/server/src/tcp/tcp_listener.rs
+++ b/core/server/src/tcp/tcp_listener.rs
@@ -24,7 +24,7 @@ use crate::shard::task_registry::ShutdownToken;
use crate::shard::transmission::event::ShardEvent;
use crate::tcp::connection_handler::{handle_connection, handle_error};
use compio::net::{TcpListener, TcpOpts};
-use error_set::ErrContext;
+use err_trail::ErrContext;
use futures::FutureExt;
use iggy_common::{IggyError, TransportProtocol};
use std::net::SocketAddr;
@@ -85,7 +85,7 @@ pub async fn start(
let listener = create_listener(addr, config)
.await
.map_err(|_| IggyError::CannotBindToSocket(addr.to_string()))
- .with_error_context(|err| {
+ .with_error(|err| {
format!("Failed to bind {server_name} server to address: {addr}, {err}")
})?;
let actual_addr = listener.local_addr().map_err(|e| {
diff --git a/core/server/src/tcp/tcp_sender.rs b/core/server/src/tcp/tcp_sender.rs
index b4a2c51da..6df12b16c 100644
--- a/core/server/src/tcp/tcp_sender.rs
+++ b/core/server/src/tcp/tcp_sender.rs
@@ -23,7 +23,7 @@ use crate::{server_error::ServerError, tcp::sender};
use compio::buf::IoBufMut;
use compio::io::AsyncWrite;
use compio::net::TcpStream;
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::IggyError;
#[derive(Debug)]
diff --git a/core/server/src/tcp/tcp_tls_listener.rs b/core/server/src/tcp/tcp_tls_listener.rs
index a4a80b0ee..2f3fa1cd2 100644
--- a/core/server/src/tcp/tcp_tls_listener.rs
+++ b/core/server/src/tcp/tcp_tls_listener.rs
@@ -24,7 +24,7 @@ use crate::shard::transmission::event::ShardEvent;
use crate::tcp::connection_handler::{handle_connection, handle_error};
use compio::net::{TcpListener, TcpOpts};
use compio_tls::TlsAcceptor;
-use error_set::ErrContext;
+use err_trail::ErrContext;
use futures::FutureExt;
use iggy_common::{IggyError, TransportProtocol};
use rustls::ServerConfig;
@@ -59,7 +59,7 @@ pub(crate) async fn start(
let listener = create_listener(addr, config)
.await
.map_err(|_| IggyError::CannotBindToSocket(addr.to_string()))
- .with_error_context(|err| {
+ .with_error(|err| {
format!("Failed to bind {server_name} server to address: {addr}, {err}")
})?;
diff --git a/core/server/src/tcp/tcp_tls_sender.rs b/core/server/src/tcp/tcp_tls_sender.rs
index d5e99cd8a..a04eb1263 100644
--- a/core/server/src/tcp/tcp_tls_sender.rs
+++ b/core/server/src/tcp/tcp_tls_sender.rs
@@ -24,7 +24,7 @@ use compio::buf::IoBufMut;
use compio::io::AsyncWrite;
use compio::net::TcpStream;
use compio_tls::TlsStream;
-use error_set::ErrContext;
+use err_trail::ErrContext;
use iggy_common::IggyError;
#[derive(Debug)]
@@ -42,9 +42,7 @@ impl Sender for TcpTlsSender {
self.stream
.flush()
.await
- .with_error_context(|e| {
- format!("failed to flush TCP stream after sending response: {e}")
- })
+ .with_error(|e| format!("failed to flush TCP stream after sending response: {e}"))
.map_err(|_| IggyError::TcpError)
}
@@ -53,9 +51,7 @@ impl Sender for TcpTlsSender {
self.stream
.flush()
.await
- .with_error_context(|e| {
- format!("failed to flush TCP stream after sending response: {e}")
- })
+ .with_error(|e| format!("failed to flush TCP stream after sending response: {e}"))
.map_err(|_| IggyError::TcpError)
}
@@ -64,9 +60,7 @@ impl Sender for TcpTlsSender {
self.stream
.flush()
.await
- .with_error_context(|e| {
- format!("failed to flush TCP stream after sending response: {e}")
- })
+ .with_error(|e| format!("failed to flush TCP stream after sending response: {e}"))
.map_err(|_| IggyError::TcpError)
}
@@ -89,9 +83,7 @@ impl Sender for TcpTlsSender {
self.stream
.flush()
.await
- .with_error_context(|e| {
- format!("failed to flush TCP stream after sending response: {e}")
- })
+ .with_error(|e| format!("failed to flush TCP stream after sending response: {e}"))
.map_err(|_| IggyError::TcpError)
}
}
diff --git a/core/server/src/websocket/websocket_listener.rs b/core/server/src/websocket/websocket_listener.rs
index 7292dad7b..b61f783b7 100644
--- a/core/server/src/websocket/websocket_listener.rs
+++ b/core/server/src/websocket/websocket_listener.rs
@@ -26,7 +26,7 @@ use crate::websocket::websocket_sender::WebSocketSender;
use compio::net::TcpListener;
use compio_net::TcpOpts;
use compio_ws::accept_async_with_config;
-use error_set::ErrContext;
+use err_trail::ErrContext;
use futures::FutureExt;
use iggy_common::IggyError;
use iggy_common::TransportProtocol;
@@ -49,7 +49,7 @@ pub async fn start(
let mut addr: SocketAddr = config
.address
.parse()
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"WebSocket (error: {error}) - failed to parse address: {}",
config.address
@@ -72,7 +72,7 @@ pub async fn start(
let listener = create_listener(addr)
.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!("WebSocket (error: {error}) - failed to bind to address: {addr}")
})
.map_err(|_| IggyError::CannotBindToSocket(addr.to_string()))?;
diff --git a/core/server/src/websocket/websocket_tls_listener.rs b/core/server/src/websocket/websocket_tls_listener.rs
index 601eaf7ad..3aaf02f7b 100644
--- a/core/server/src/websocket/websocket_tls_listener.rs
+++ b/core/server/src/websocket/websocket_tls_listener.rs
@@ -26,7 +26,7 @@ use compio::net::TcpListener;
use compio_net::TcpOpts;
use compio_tls::TlsAcceptor;
use compio_ws::accept_async_with_config;
-use error_set::ErrContext;
+use err_trail::ErrContext;
use futures::FutureExt;
use iggy_common::{IggyError, TransportProtocol};
use rustls::ServerConfig;
@@ -53,7 +53,7 @@ pub async fn start(
let mut addr: SocketAddr = config
.address
.parse()
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"WebSocket TLS (error: {error}) - failed to parse address: {}",
config.address
@@ -75,7 +75,7 @@ pub async fn start(
let listener = create_listener(addr)
.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!("WebSocket TLS (error: {error}) - failed to bind to address: {addr}")
})
.map_err(|_| IggyError::CannotBindToSocket(addr.to_string()))?;
(iggy) 01/02: Merge branch 'master' into io_uring_tpc_master_merge
Posted by gk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
gkoszyk pushed a commit to branch io_uring_tpc_master_merge
in repository https://gitbox.apache.org/repos/asf/iggy.git
commit 98a9b11c0417d5d17f100a000f525b862f437d48
Merge: 5ee9b0825 7ef307c47
Author: numminex <g....@gmail.com>
AuthorDate: Mon Oct 27 21:12:55 2025 +0100
Merge branch 'master' into io_uring_tpc_master_merge
.github/actions/csharp-dotnet/pre-merge/action.yml | 28 +-
.github/actions/go/pre-merge/action.yml | 8 +
.github/config/components.yml | 10 +-
.github/workflows/_build_python_wheels.yml | 26 +-
.github/workflows/_test_examples.yml | 9 +-
.github/workflows/publish.yml | 4 +-
.gitignore | 2 +-
Cargo.lock | 412 +-
Cargo.toml | 45 +-
DEPENDENCIES.md | 374 +-
README.md | 51 +-
bdd/docker-compose.yml | 2 +
bdd/go/tests/tcp_test/consumers_feature_create.go | 12 +-
bdd/go/tests/tcp_test/consumers_feature_delete.go | 6 +-
.../tests/tcp_test/consumers_feature_get_by_id.go | 6 +-
bdd/go/tests/tcp_test/consumers_feature_join.go | 7 +-
bdd/go/tests/tcp_test/consumers_feature_leave.go | 7 +-
bdd/go/tests/tcp_test/consumers_steps.go | 4 +-
bdd/go/tests/tcp_test/messages_feature_send.go | 9 +-
bdd/go/tests/tcp_test/offset_feature_delete.go | 6 +-
bdd/go/tests/tcp_test/partitions_feature_create.go | 5 +-
bdd/go/tests/tcp_test/partitions_feature_delete.go | 5 +-
bdd/go/tests/tcp_test/stream_feature_create.go | 7 +-
bdd/go/tests/tcp_test/stream_feature_delete.go | 3 +-
bdd/go/tests/tcp_test/stream_feature_get_by_id.go | 6 +-
bdd/go/tests/tcp_test/stream_feature_update.go | 7 +-
bdd/go/tests/tcp_test/stream_steps.go | 2 +-
bdd/go/tests/tcp_test/test_shared_steps.go | 16 +-
bdd/go/tests/tcp_test/topic_feature_create.go | 9 +-
bdd/go/tests/tcp_test/topic_feature_delete.go | 4 +-
bdd/go/tests/tcp_test/topic_feature_get_by_id.go | 4 +-
bdd/go/tests/tcp_test/topic_feature_update.go | 9 +-
bdd/go/tests/tcp_test/topic_steps.go | 5 +-
bdd/go/tests/tcp_test/users_steps.go | 3 +-
bdd/python/Dockerfile | 4 +-
core/ai/mcp/Cargo.toml | 7 +-
core/ai/mcp/README.md | 4 +-
core/ai/mcp/config.toml | 8 +-
core/ai/mcp/src/api.rs | 31 +-
core/ai/mcp/src/configs.rs | 165 +-
core/ai/mcp/src/error.rs | 2 -
core/ai/mcp/src/main.rs | 45 +-
core/ai/mcp/src/service/mod.rs | 9 +-
core/ai/mcp/src/service/requests.rs | 12 +-
core/ai/mcp/src/stream.rs | 11 +-
core/bench/dashboard/server/Cargo.toml | 4 +-
core/cli/Cargo.toml | 2 +-
core/common/Cargo.toml | 4 +-
core/common/src/configs/mod.rs | 777 ++++
core/common/src/lib.rs | 9 +-
.../configuration/tcp_config/tcp_client_config.rs | 3 +-
.../tcp_config/tcp_client_config_builder.rs | 3 +-
core/common/src/utils/mod.rs | 1 +
core/connectors/README.md | 4 +-
core/connectors/runtime/Cargo.toml | 7 +-
core/connectors/runtime/README.md | 12 +-
core/connectors/runtime/config.toml | 144 +-
.../runtime/{config.toml => example_config.toml} | 12 +-
core/connectors/runtime/src/api/auth.rs | 9 +-
core/connectors/runtime/src/api/config.rs | 65 +-
core/connectors/runtime/src/api/mod.rs | 37 +-
core/connectors/runtime/src/configs.rs | 223 +-
core/connectors/runtime/src/context.rs | 15 +-
core/connectors/runtime/src/main.rs | 23 +-
core/connectors/runtime/src/stream.rs | 11 +-
core/connectors/sdk/Cargo.toml | 2 +-
core/connectors/sdk/src/lib.rs | 3 +-
core/connectors/sdk/src/sink.rs | 9 +-
core/connectors/sinks/postgres_sink/src/lib.rs | 10 +
core/connectors/sinks/quickwit_sink/Cargo.toml | 2 +-
core/connectors/sinks/quickwit_sink/src/lib.rs | 2 +-
core/connectors/sources/postgres_source/Cargo.toml | 4 +
core/connectors/sources/postgres_source/README.md | 31 +-
core/connectors/sources/postgres_source/src/lib.rs | 199 +-
core/integration/Cargo.toml | 12 +-
core/integration/src/test_connectors_runtime.rs | 240 ++
core/integration/src/test_server.rs | 9 +-
core/integration/tests/config_provider/mod.rs | 14 +-
core/integration/tests/connectors/mod.rs | 142 +
core/integration/tests/connectors/postgres/mod.rs | 60 +
.../tests/connectors/postgres/postgres.toml | 51 +-
.../tests/connectors/postgres/postgres_sink.rs | 13 +-
core/integration/tests/mod.rs | 1 +
core/sdk/src/tcp/tcp_client.rs | 12 +-
core/server/Cargo.toml | 19 +-
.../create_consumer_group_handler.rs | 2 +-
.../delete_consumer_group_handler.rs | 4 +-
.../consumer_groups/join_consumer_group_handler.rs | 2 +-
.../leave_consumer_group_handler.rs | 2 +-
.../delete_consumer_offset_handler.rs | 4 +-
.../store_consumer_offset_handler.rs | 4 +-
.../messages/flush_unsaved_buffer_handler.rs | 4 +-
.../partitions/create_partitions_handler.rs | 4 +-
.../partitions/delete_partitions_handler.rs | 4 +-
.../create_personal_access_token_handler.rs | 4 +-
.../delete_personal_access_token_handler.rs | 4 +-
.../login_with_personal_access_token_handler.rs | 2 +-
.../handlers/segments/delete_segments_handler.rs | 4 +-
.../handlers/streams/delete_stream_handler.rs | 4 +-
.../binary/handlers/streams/get_streams_handler.rs | 2 +-
.../handlers/streams/purge_stream_handler.rs | 4 +-
.../handlers/streams/update_stream_handler.rs | 4 +-
.../binary/handlers/topics/delete_topic_handler.rs | 4 +-
.../binary/handlers/topics/purge_topic_handler.rs | 6 +-
.../binary/handlers/topics/update_topic_handler.rs | 2 +-
.../handlers/users/change_password_handler.rs | 4 +-
.../binary/handlers/users/delete_user_handler.rs | 4 +-
.../binary/handlers/users/login_user_handler.rs | 2 +-
.../binary/handlers/users/logout_user_handler.rs | 2 +-
.../handlers/users/update_permissions_handler.rs | 2 +-
.../binary/handlers/users/update_user_handler.rs | 4 +-
core/server/src/configs/config_provider.rs | 442 --
core/server/src/configs/defaults.rs | 2 +
core/server/src/configs/server.rs | 101 +-
core/server/src/configs/validators.rs | 46 +-
core/server/src/http/consumer_groups.rs | 2 +-
core/server/src/http/consumer_offsets.rs | 6 +-
core/server/src/http/jwt/json_web_token.rs | 2 +-
core/server/src/http/jwt/jwt_manager.rs | 12 +-
core/server/src/http/jwt/middleware.rs | 12 +-
core/server/src/http/jwt/storage.rs | 10 +-
core/server/src/http/system.rs | 2 +-
core/server/src/quic/quic_sender.rs | 10 +-
core/server/src/quic/quic_server.rs | 22 +-
core/server/src/server_error.rs | 32 +-
core/server/src/shard/system/clients.rs | 4 +-
.../src/shard/system/personal_access_tokens.rs | 14 +-
core/server/src/shard/system/storage.rs | 4 +-
core/server/src/shard/transmission/id.rs | 25 +
core/server/src/state/file.rs | 43 +-
core/server/src/state/models.rs | 44 +-
core/server/src/state/system.rs | 8 +-
core/server/src/streaming/partitions/segments.rs | 2 +-
core/server/src/streaming/persistence/persister.rs | 16 +-
.../src/streaming/segments/indexes/index_reader.rs | 2 +-
.../src/streaming/segments/indexes/index_writer.rs | 10 +-
.../streaming/segments/messages/messages_reader.rs | 2 +-
.../streaming/segments/messages/messages_writer.rs | 4 +-
core/server/src/tcp/tcp_sender.rs | 2 +-
core/server/src/tcp/tcp_tls_sender.rs | 2 +-
{foreign => examples}/csharp/.editorconfig | 2 +-
examples/csharp/Iggy_SDK.Examples.sln | 118 +
examples/csharp/Iggy_SDK.Examples.sln.DotSettings | 301 ++
examples/csharp/README.md | 80 +
.../Iggy_SDK.Examples.Basic.Consumer.csproj | 24 +
.../Iggy_SDK.Examples.Basic.Consumer/Program.cs | 91 +
.../Iggy_SDK.Examples.Basic.Consumer/Settings.cs | 21 +-
.../appsettings.json | 10 +
.../Iggy_SDK.Examples.Basic.Producer.csproj | 24 +
.../Iggy_SDK.Examples.Basic.Producer/Program.cs | 91 +
.../Iggy_SDK.Examples.Basic.Producer/Settings.cs | 23 +-
.../appsettings.json | 12 +
...ggy_SDK.Examples.GettingStarted.Consumer.csproj | 15 +-
.../Utils.cs | 124 +
...ggy_SDK.Examples.GettingStarted.Producer.csproj | 15 +-
.../Program.cs | 28 +-
.../Utils.cs | 143 +
.../src/Iggy_SDK.Examples.Shared/ExampleHelpers.cs | 60 +
.../Iggy_SDK.Examples.Shared.csproj | 11 +
.../src/Iggy_SDK.Examples.Shared/Messages.cs | 115 +
.../Iggy_SDK.Examples.Shared/MessagesGenerator.cs | 69 +
...gy_SDK.Examples.MessageEnvelope.Consumer.csproj | 19 +
.../Program.cs | 27 +-
.../Utils.cs | 152 +
...gy_SDK.Examples.MessageEnvelope.Producer.csproj | 19 +
.../Program.cs | 28 +-
.../Utils.cs | 151 +
...ggy_SDK.Examples.MessageHeaders.Consumer.csproj | 15 +-
.../Program.cs | 27 +-
.../Utils.cs | 153 +
...ggy_SDK.Examples.MessageHeaders.Producer.csproj | 15 +-
.../Program.cs | 28 +-
.../Utils.cs | 156 +
.../Iggy_SDK.Examples.NewSdk.Consumer.csproj | 22 +
.../Iggy_SDK.Examples.NewSdk.Consumer/Program.cs | 60 +
.../Iggy_SDK.Examples.NewSdk.Consumer/Utils.cs | 97 +
.../Iggy_SDK.Examples.NewSdk.Producer.csproj | 20 +
.../Iggy_SDK.Examples.NewSdk.Producer/Program.cs | 47 +
.../Iggy_SDK.Examples.NewSdk.Producer/Utils.cs | 110 +
examples/rust/src/shared/args.rs | 12 +-
foreign/cpp/tests/e2e/server.toml | 14 -
foreign/csharp/.editorconfig | 2 +-
foreign/csharp/Benchmarks/Program.cs | 30 +-
foreign/csharp/Benchmarks/SendMessage.cs | 10 +-
foreign/csharp/DEPENDENCIES.md | 14 +-
foreign/csharp/Directory.Packages.props | 12 +-
.../Iggy_SDK.Tests.BDD/Context/TestContext.cs | 34 +-
.../BasicMessagingOperationsSteps.cs | 52 +-
.../FetchMessagesTests.cs | 127 +-
.../Fixtures/FetchMessagesFixture.cs | 90 +-
.../Fixtures/FlushMessageFixture.cs | 20 +-
.../Fixtures/IggyServerFixture.cs | 16 +-
.../Fixtures/OffsetFixtures.cs | 20 +-
.../Fixtures/PollMessagesFixture.cs | 80 -
.../Helpers/NameIdHelpers.cs | 14 +-
.../IggyConsumerTests.cs | 838 ++++
.../IggyPublisherTests.cs | 606 +++
.../Iggy_SDK.Tests.Integration.csproj | 2 +-
.../Iggy_SDK.Tests.Integration/OffsetTests.cs | 33 +
.../PollMessagesTests.cs | 62 -
.../SendMessagesTests.cs | 68 +-
.../Iggy_SDK.Tests.Integration/StreamsTests.cs | 49 +-
.../Iggy_SDK.Tests.Integration/SystemTests.cs | 10 +-
.../Iggy_SDK.Tests.Integration/TopicsTests.cs | 46 +-
foreign/csharp/Iggy_SDK.sln | 12 -
...amConfigurator.cs => IggyClientConfigurator.cs} | 19 +-
.../Configuration/MessageStreamConfigurator.cs | 49 -
.../Iggy_SDK/Configuration/TlsConfiguration.cs | 4 +-
.../ConnectionStream/TcpConnectionStream.cs | 8 +-
.../Iggy_SDK/Consumers/AutoCommitMode.cs} | 36 +-
.../ConsumerErrorEventArgs.cs} | 28 +-
foreign/csharp/Iggy_SDK/Consumers/IDeserializer.cs | 54 +
.../Iggy_SDK/Consumers/IggyConsumer.Logging.cs | 107 +
foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs | 401 ++
.../Iggy_SDK/Consumers/IggyConsumerBuilder.cs | 316 ++
.../Iggy_SDK/Consumers/IggyConsumerBuilderOfT.cs | 141 +
.../Iggy_SDK/Consumers/IggyConsumerConfig.cs | 152 +
.../csharp/Iggy_SDK/Consumers/IggyConsumerOfT.cs | 107 +
.../MessageStatus.cs} | 28 +-
.../csharp/Iggy_SDK/Consumers/ReceivedMessage.cs | 63 +
.../Iggy_SDK/Contracts/MessageFetchRequest.cs | 4 +-
.../csharp/Iggy_SDK/Contracts/MessageResponse.cs | 6 +-
.../Iggy_SDK/Contracts/MessageResponseGeneric.cs | 4 +-
.../csharp/Iggy_SDK/Contracts/PolledMessages.cs | 4 +-
.../csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs | 10 +-
.../Iggy_SDK/Encryption/AesMessageEncryptor.cs | 128 +
.../Encryption/IMessageEncryptor.cs} | 32 +-
.../Exceptions/ConsumerGroupNotFoundException.cs | 18 +
...ption.cs => ConsumerNotInitializedException.cs} | 16 +-
.../IggyInvalidStatusCodeException.cs} | 16 +-
.../Exceptions/InvalidBaseAdressException.cs | 4 +-
.../InvalidConsumerGroupNameException.cs | 14 +-
...tion.cs => PublisherNotInitializedException.cs} | 16 +-
...ressException.cs => StreamNotFoundException.cs} | 23 +-
...dressException.cs => TopicNotFoundException.cs} | 27 +-
.../Iggy_SDK/Extensions/IggyClientExtenstion.cs | 44 +
.../Iggy_SDK/Factory/HttpMessageStreamBuilder.cs | 78 -
.../csharp/Iggy_SDK/Factory/IggyClientFactory.cs | 79 +
.../Iggy_SDK/Factory/MessageStreamFactory.cs | 105 -
.../Iggy_SDK/Factory/TcpMessageStreamBuilder.cs | 78 -
foreign/csharp/Iggy_SDK/Identifier.cs | 22 +-
foreign/csharp/Iggy_SDK/IggyClient/IIggyClient.cs | 4 +-
.../csharp/Iggy_SDK/IggyClient/IIggyConsumer.cs | 30 +-
.../Iggy_SDK/IggyClient/IIggyConsumerGroup.cs | 4 +-
.../csharp/Iggy_SDK/IggyClient/IIggyPublisher.cs | 22 +-
.../Implementations/HttpMessageStream.cs | 261 +-
.../IggyClient/Implementations/TcpMessageStream.cs | 650 +--
foreign/csharp/Iggy_SDK/Iggy_SDK.csproj | 10 +-
foreign/csharp/Iggy_SDK/Kinds/PollingStrategy.cs | 38 +-
foreign/csharp/Iggy_SDK/Messages/Message.cs | 9 +-
foreign/csharp/Iggy_SDK/Messages/MessageHeader.cs | 18 +-
.../MessagesDispatcher/HttpMessageInvoker.cs | 70 -
.../MessagesDispatcher/MessageSenderDispatcher.cs | 214 -
.../MessagesDispatcher/TcpMessageInvoker.cs | 88 -
.../BackgroundMessageProcessor.Logging.cs | 81 +
.../Publishers/BackgroundMessageProcessor.cs | 262 ++
foreign/csharp/Iggy_SDK/Publishers/ISerializer.cs | 54 +
.../Iggy_SDK/Publishers/IggyPublisher.Logging.cs | 139 +
.../csharp/Iggy_SDK/Publishers/IggyPublisher.cs | 336 ++
.../Iggy_SDK/Publishers/IggyPublisherBuilder.cs | 425 ++
.../Iggy_SDK/Publishers/IggyPublisherBuilderOfT.cs | 141 +
.../Iggy_SDK/Publishers/IggyPublisherConfig.cs | 257 ++
.../csharp/Iggy_SDK/Publishers/IggyPublisherOfT.cs | 116 +
.../Publishers/MessageBatchFailedEventArgs.cs | 60 +
.../Iggy_SDK/Publishers/PublisherErrorEventArgs.cs | 51 +
.../Iggy_SDK/Utils/TcpMessageStreamHelpers.cs | 77 +-
.../Iggy_SDK_Tests/ContractTests/TcpContract.cs | 4 +-
.../Utils/Messages/MessageFactory.cs | 8 +-
foreign/csharp/Iggy_Sample_Consumer/Program.cs | 227 --
.../Iggy_Sample_Producer/MessageGenerator.cs | 85 -
foreign/csharp/Iggy_Sample_Producer/Program.cs | 224 -
foreign/csharp/README.md | 6 +-
.../binary_response_deserializer.go | 2 +-
.../identifier_serializer_test.go | 7 +-
foreign/go/contracts/identifier.go | 11 +-
foreign/go/contracts/messages.go | 6 +-
foreign/go/errors/constants.go | 65 -
foreign/go/errors/errors.go | 293 +-
foreign/go/errors/errors.yaml | 1111 +++++
foreign/go/errors/errors_gen.go | 3477 ++++++++++++++++
foreign/go/errors/errors_test.go | 68 +-
foreign/go/errors/generator/main.go | 209 +
foreign/go/go.mod | 1 +
foreign/go/go.sum | 4 +
foreign/go/tcp/tcp_consumer_group_managament.go | 9 +-
foreign/go/tcp/tcp_core.go | 41 +-
foreign/go/tcp/tcp_messaging.go | 6 +-
foreign/go/tcp/tcp_stream_managament.go | 13 +-
foreign/go/tcp/tcp_topic_managament.go | 23 +-
foreign/go/tcp/tcp_user_managament.go | 2 +-
foreign/java/BUILD_AND_TEST.md | 293 ++
foreign/java/examples/build.gradle.kts | 69 +-
.../apache/iggy/async/AsyncConsumerExample.java | 159 +
.../java/org/apache/iggy/async/AsyncProducer.java | 230 ++
.../iggy-connector-library/README.md | 72 +
.../iggy-connector-library/build.gradle.kts | 113 +
.../connector/config/IggyConnectionConfig.java | 228 ++
.../apache/iggy/connector/config/OffsetConfig.java | 153 +
.../iggy/connector/error/ConnectorException.java | 94 +
.../iggy/connector/partition/PartitionInfo.java | 123 +
.../serialization/DeserializationSchema.java | 63 +
.../connector/serialization/RecordMetadata.java | 100 +
.../serialization/SerializationSchema.java | 65 +
.../connector/serialization/TypeDescriptor.java | 88 +
.../connector/config/IggyConnectionConfigTest.java | 221 +
.../iggy/connector/config/OffsetConfigTest.java | 167 +
.../connector/error/ConnectorExceptionTest.java | 168 +
.../connector/partition/PartitionInfoTest.java | 157 +
.../serialization/DeserializationSchemaTest.java | 171 +
.../serialization/RecordMetadataTest.java | 151 +
.../serialization/SerializationSchemaTest.java | 208 +
.../serialization/TypeDescriptorTest.java | 178 +
foreign/java/java-sdk/build.gradle.kts | 4 +-
.../iggy/client/async/ConsumerGroupsClient.java | 52 +
.../apache/iggy/client/async/MessagesClient.java | 127 +
.../apache/iggy/client/async/StreamsClient.java | 53 +
.../org/apache/iggy/client/async/TopicsClient.java | 102 +
.../org/apache/iggy/client/async/UsersClient.java | 47 +-
.../client/async/tcp/AsyncBytesDeserializer.java | 211 +
.../client/async/tcp/AsyncBytesSerializer.java | 215 +
.../iggy/client/async/tcp/AsyncIggyTcpClient.java | 349 ++
.../iggy/client/async/tcp/AsyncTcpConnection.java | 232 ++
.../client/async/tcp/ConsumerGroupsTcpClient.java | 88 +
.../iggy/client/async/tcp/IggyFrameDecoder.java | 73 +
.../iggy/client/async/tcp/MessagesTcpClient.java | 137 +
.../iggy/client/async/tcp/StreamsTcpClient.java | 116 +
.../iggy/client/async/tcp/TopicsTcpClient.java | 152 +
.../iggy/client/async/tcp/UsersTcpClient.java | 86 +
.../iggy/client/blocking/tcp/CommandCode.java | 2 +-
.../iggy/client/blocking/tcp/IggyTcpClient.java | 226 ++
.../client/async/AsyncClientIntegrationTest.java | 410 ++
.../iggy/client/async/AsyncPollMessageTest.java | 336 ++
.../async/tcp/AsyncIggyTcpClientBuilderTest.java | 299 ++
.../blocking/tcp/IggyTcpClientBuilderTest.java | 243 ++
foreign/java/settings.gradle.kts | 7 +
foreign/node/package-lock.json | 4 -
foreign/node/src/examples/utils.ts | 14 -
foreign/python/Cargo.toml | 11 +-
foreign/python/apache_iggy.pyi | 5 +
foreign/python/src/client.rs | 23 +-
helm/charts/iggy/.helmignore | 23 +
web/Dockerfile => helm/charts/iggy/Chart.yaml | 31 +-
helm/charts/iggy/README.md | 94 +
helm/charts/iggy/templates/NOTES.txt | 22 +
helm/charts/iggy/templates/_helpers.tpl | 99 +
helm/charts/iggy/templates/deployment.yaml | 200 +
helm/charts/iggy/templates/hpa.yaml | 61 +
helm/charts/iggy/templates/ingress.yaml | 143 +
.../iggy/templates/root-user-credentials.yaml | 31 +-
helm/charts/iggy/templates/service.yaml | 59 +
.../charts/iggy/templates/serviceaccount.yaml | 30 +-
.../charts/iggy/templates/servicemonitor.yaml | 52 +-
helm/charts/iggy/values.yaml | 219 +
scripts/run-bdd-tests.sh | 15 -
scripts/run-csharp-examples-from-readme.sh | 210 +
web/.eslintignore | 13 -
web/.eslintrc.cjs | 51 -
web/.prettierrc | 20 +-
web/Dockerfile | 42 +-
web/eslint.config.js | 75 +
web/package-lock.json | 4280 +++++++++-----------
web/package.json | 44 +-
web/postcss.config.js | 8 +-
web/src/app.html | 2 +-
web/src/hooks.server.ts | 2 +-
web/src/lib/actions/tooltip.ts | 5 +-
web/src/lib/api/ApiSchema.ts | 2 +-
web/src/lib/api/convertBigIntsToStrings.ts | 2 +-
web/src/lib/api/handleFetchErrors.ts | 8 +-
web/src/lib/components/AppToasts.svelte | 4 +-
web/src/lib/components/Breadcrumbs.svelte | 13 +-
web/src/lib/components/Button.svelte | 22 +-
web/src/lib/components/Checkbox.svelte | 12 +-
web/src/lib/components/Combobox.svelte | 36 +-
.../components/DeleteButtonWithConfirmation.svelte | 2 +-
.../components/DropdownMenu/DropdownMenu.svelte | 12 +-
web/src/lib/components/Header.svelte | 12 +-
web/src/lib/components/Icon.svelte | 2 +-
web/src/lib/components/Input.svelte | 13 +-
.../lib/components/Layouts/SettingsLayout.svelte | 6 +-
web/src/lib/components/Listbox.svelte | 18 +-
web/src/lib/components/Loader.svelte | 5 +-
web/src/lib/components/LoadingIndicator.svelte | 2 +-
web/src/lib/components/Logo/Logo.svelte | 4 +-
web/src/lib/components/Logo/LogoMark.svelte | 243 +-
.../MessageDecoder/MessageDecoder.svelte | 6 +-
web/src/lib/components/ModalConfirmation.svelte | 13 +-
.../components/Modals/AddPartitionsModal.svelte | 12 +-
.../lib/components/Modals/AddStreamModal.svelte | 62 +-
web/src/lib/components/Modals/AddTopicModal.svelte | 19 +-
web/src/lib/components/Modals/AddUserModal.svelte | 13 +-
web/src/lib/components/Modals/AppModals.svelte | 27 +-
.../components/Modals/DeletePartitionsModal.svelte | 80 +-
.../lib/components/Modals/InspectMessage.svelte | 34 +-
web/src/lib/components/Modals/ModalBase.svelte | 12 +-
.../components/Modals/StreamSettingsModal.svelte | 87 +-
.../components/Modals/TopicSettingsModal.svelte | 22 +-
web/src/lib/components/Navbar.svelte | 12 +-
web/src/lib/components/Paginator.svelte | 3 +-
web/src/lib/components/PasswordInput.svelte | 6 +-
web/src/lib/components/PeriodicInvalidator.svelte | 18 +-
web/src/lib/components/PermissionsManager.svelte | 176 +-
.../RouteComponents/Settings/UsersTab.svelte | 44 +-
.../Settings/UsersTabActions.svelte | 6 +-
web/src/lib/components/Select.svelte | 17 +-
web/src/lib/components/SlimSortableList.svelte | 24 +-
web/src/lib/components/SortableList.svelte | 35 +-
web/src/lib/components/StopPropagation.svelte | 3 +-
web/src/lib/components/Toggler.svelte | 6 +-
web/src/lib/domain/Partition.ts | 1 -
web/src/lib/domain/Permissions.ts | 1 -
web/src/lib/domain/Stream.ts | 2 -
web/src/lib/domain/Topic.ts | 7 +-
web/src/lib/types/utilTypes.ts | 8 +-
web/src/lib/utils/constants/keys.ts | 110 +-
web/src/lib/utils/constants/tokens.ts | 2 +-
web/src/routes/api/proxy/+server.ts | 4 +-
web/src/routes/auth/+layout.svelte | 2 +-
web/src/routes/auth/sign-in/+page.server.ts | 10 +-
web/src/routes/auth/sign-in/+page.svelte | 10 +-
web/src/routes/dashboard/+layout.svelte | 2 +-
web/src/routes/dashboard/overview/+page.svelte | 4 +-
.../routes/dashboard/settings/server/+page.svelte | 4 +-
.../routes/dashboard/settings/users/+page.svelte | 54 +-
.../routes/dashboard/settings/webUI/+page.svelte | 7 +-
web/src/routes/dashboard/streams/+layout.svelte | 16 +-
.../dashboard/streams/[streamId=i32]/+page.svelte | 167 +-
.../streams/[streamId=i32]/topics/+page.svelte | 3 +-
.../topics/[topicId=i32]/+page.svelte | 176 +-
.../partitions/[partitionId=i32]/+page.svelte | 3 +-
.../[partitionId=i32]/messages/+page.svelte | 242 +-
web/src/styles/app.css | 136 +-
web/svelte.config.js | 20 +-
web/tailwind.config.js | 68 -
web/tsconfig.json | 2 +-
web/vite.config.ts | 30 +-
436 files changed, 27298 insertions(+), 8612 deletions(-)
diff --cc Cargo.lock
index ca2334e0f,1179da095..ab94339e0
--- a/Cargo.lock
+++ b/Cargo.lock
@@@ -8,7 -8,7 +8,8 @@@ version = "0.5.2
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f7b0a21988c1bf877cf4759ef5ddaac04c1c9fe808c9142ecb78ba97d97a28a"
dependencies = [
+ "bitflags 2.9.4",
+ "bitflags 2.10.0",
"bytes",
"futures-core",
"futures-sink",
@@@ -44,7 -44,7 +45,8 @@@ dependencies =
"actix-service",
"actix-utils",
"actix-web",
+ "bitflags 2.9.4",
+ "bitflags 2.10.0",
"bytes",
"derive_more 2.0.1",
"futures-core",
@@@ -423,12 -417,6 +425,18 @@@ dependencies =
"password-hash",
]
+[[package]]
+name = "arraydeque"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
- checksum = "7d902e3d592a523def97af8f317b08ce16b7ab854c1985a0c671e6f15cebc236"
++checksum = "3c3610892ee6e0cbce8ae2700349fcf8f98adb0dbfbee85aec3c9179d29cc072"
++dependencies = [
++ "base64ct",
++ "blake2",
++ "cpufeatures",
++ "password-hash",
++]
+
[[package]]
name = "arrayref"
version = "0.3.9"
@@@ -605,17 -575,19 +613,26 @@@ dependencies =
"futures-lite",
"pin-project",
"thiserror 2.0.17",
- "tokio",
- "tokio-util",
+]
+
+[[package]]
+name = "atoi"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528"
+dependencies = [
+ "num-traits",
]
+ [[package]]
+ name = "atoi"
+ version = "2.0.0"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+ checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528"
+ dependencies = [
+ "num-traits",
+ ]
+
[[package]]
name = "atomic"
version = "0.6.1"
@@@ -956,11 -964,11 +973,11 @@@ checksum = "bef38d45163c2f1dde094a7dfd3
[[package]]
name = "bitflags"
-version = "2.10.0"
+version = "2.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3"
+checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394"
dependencies = [
- "serde",
+ "serde_core",
]
[[package]]
@@@ -2428,19 -2257,30 +2445,39 @@@ dependencies =
[[package]]
name = "doc-comment"
- version = "0.3.3"
+ version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
- checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10"
+ checksum = "780955b8b195a21ab8e4ac6b60dd1dbdcec1dc6c51c0617964b08c81785e12c9"
+
+ [[package]]
+ name = "docker_credential"
+ version = "1.3.2"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+ checksum = "1d89dfcba45b4afad7450a99b39e751590463e45c04728cf555d36bb66940de8"
+ dependencies = [
+ "base64 0.21.7",
+ "serde",
+ "serde_json",
+ ]
+
+ [[package]]
+ name = "document-features"
+ version = "0.2.12"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+ checksum = "d4b8a88685455ed29a21542a33abd9cb6510b6b129abadabdcef0f4c55bc8f61"
+ dependencies = [
+ "litrs",
+ ]
+[[package]]
+name = "document-features"
+version = "0.2.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "95249b50c6c185bee49034bcb378a49dc2b5dff0be90ff6616d31d64febab05d"
+dependencies = [
+ "litrs",
+]
+
[[package]]
name = "dotenvy"
version = "0.15.7"
@@@ -2569,25 -2468,11 +2606,22 @@@ version = "1.0.2
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
+[[package]]
+name = "erased-serde"
+version = "0.4.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "259d404d09818dec19332e31d94558aeb442fea04c817006456c24b5460bbd4b"
+dependencies = [
+ "serde",
+ "serde_core",
+ "typeid",
+]
+
[[package]]
name = "err_trail"
- version = "0.8.5"
+ version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
- checksum = "cf171eed0f19d57286fabcc6634d5c85b1054921f531a44c962225bbb06190b4"
- dependencies = [
- "tracing",
- ]
+ checksum = "fd07fd8b9b9a8ed762d905184c29d418a88296c2cff36d934004dd93569ae443"
[[package]]
name = "errno"
@@@ -3557,11 -3496,11 +3611,11 @@@ dependencies =
[[package]]
name = "halfbrown"
- version = "0.3.0"
+ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
- checksum = "aa2c385c6df70fd180bbb673d93039dbd2cd34e41d782600bdf6e1ca7bce39aa"
+ checksum = "0c7ed2f2edad8a14c8186b847909a41fbb9c3eafa44f88bd891114ed5019da09"
dependencies = [
- "hashbrown 0.16.0",
+ "hashbrown 0.15.5",
"serde",
]
@@@ -3619,15 -3552,20 +3673,26 @@@ checksum = "9229cfe53dfd69f0609a49f6546
dependencies = [
"allocator-api2",
"equivalent",
- "foldhash",
+ "foldhash 0.1.5",
+ ]
+
+ [[package]]
+ name = "hashbrown"
+ version = "0.16.0"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+ checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d"
+ dependencies = [
+ "allocator-api2",
+ "equivalent",
+ "foldhash 0.2.0",
]
+[[package]]
+name = "hashbrown"
+version = "0.16.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d"
+
[[package]]
name = "hashlink"
version = "0.10.0"
@@@ -4567,9 -4508,9 +4643,9 @@@ dependencies =
[[package]]
name = "is_terminal_polyfill"
- version = "1.70.1"
+ version = "1.70.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
+checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
[[package]]
name = "itertools"
@@@ -4893,16 -4846,6 +4981,16 @@@ dependencies =
"vcpkg",
]
+[[package]]
- name = "libyml"
- version = "0.0.5"
++name = "libsqlite3-sys"
++version = "0.30.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
- checksum = "3302702afa434ffa30847a83305f0a69d6abd74293b6554c18ec85c7ef30c980"
++checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149"
+dependencies = [
- "anyhow",
- "version_check",
++ "pkg-config",
++ "vcpkg",
+]
+
[[package]]
name = "libz-rs-sys"
version = "0.5.2"
@@@ -6823,29 -6842,17 +6915,50 @@@ dependencies =
"uuid",
]
+[[package]]
+name = "rmcp-macros"
+version = "0.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1827cd98dab34cade0513243c6fe0351f0f0b2c9d6825460bcf45b42804bdda0"
+dependencies = [
+ "darling 0.21.3",
+ "proc-macro2",
+ "quote",
+ "serde_json",
+ "syn 2.0.106",
+]
+
+[[package]]
+name = "ron"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
- checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94"
++checksum = "1fdad1258f7259fdc0f2dfc266939c82c3b5d1fd72bcde274d600cdc27e60243"
+dependencies = [
+ "base64 0.21.7",
+ "bitflags 2.9.4",
+ "serde",
- "serde_derive",
++ "serde_json",
++ "sse-stream",
++ "thiserror 2.0.17",
++ "tokio",
++ "tokio-stream",
++ "tokio-util",
++ "tower-service",
++ "tracing",
++ "uuid",
++]
++
+ [[package]]
+ name = "rmcp-macros"
+ version = "0.8.3"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+ checksum = "ede0589a208cc7ce81d1be68aa7e74b917fcd03c81528408bab0457e187dcd9b"
+ dependencies = [
+ "darling 0.21.3",
+ "proc-macro2",
+ "quote",
+ "serde_json",
+ "syn 2.0.108",
]
[[package]]
@@@ -7098,23 -7140,17 +7211,43 @@@ dependencies =
"serde_json",
]
+[[package]]
+name = "schemars_derive"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "33d020396d1d138dc19f1165df7545479dcd58d93810dc5d646a16e55abefa80"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "serde_derive_internals",
+ "syn 2.0.106",
+]
+
+[[package]]
+name = "scoped-tls"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
- checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294"
++checksum = "82d20c4491bc164fa2f6c5d44565947a52ad80b9505d8e36f8d54c27c739fcd0"
++dependencies = [
++ "chrono",
++ "dyn-clone",
++ "ref-cast",
++ "schemars_derive",
++ "serde",
++ "serde_json",
++]
++
+ [[package]]
+ name = "schemars_derive"
+ version = "1.0.4"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+ checksum = "33d020396d1d138dc19f1165df7545479dcd58d93810dc5d646a16e55abefa80"
+ dependencies = [
+ "proc-macro2",
+ "quote",
+ "serde_derive_internals",
+ "syn 2.0.108",
+ ]
[[package]]
name = "scopeguard"
@@@ -7457,12 -7462,12 +7589,12 @@@ dependencies =
"figment",
"flume",
"futures",
+ "hash32 1.0.0",
"human-repr",
"iggy_common",
- "jsonwebtoken",
+ "jsonwebtoken 10.1.0",
"lending-iterator",
"mimalloc",
- "mockall",
"moka",
"nix",
"once_cell",
@@@ -7570,11 -7571,10 +7702,11 @@@ checksum = "d66dc143e6b11c1eddc06d5c423
[[package]]
name = "simd-json"
- version = "0.15.1"
+ version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
- checksum = "c962f626b54771990066e5435ec8331d1462576cd2d1e62f24076ae014f92112"
+ checksum = "4255126f310d2ba20048db6321c81ab376f6a6735608bf11f0785c41f01f64e3"
dependencies = [
+ "getrandom 0.3.4",
"halfbrown",
"ref-cast",
"serde",
@@@ -7940,16 -7940,22 +8072,27 @@@ dependencies =
]
[[package]]
-name = "static_assertions"
-version = "1.1.0"
+name = "stringprep"
+version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
+checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1"
+dependencies = [
+ "unicode-bidi",
+ "unicode-normalization",
+ "unicode-properties",
+]
+ [[package]]
+ name = "stringprep"
+ version = "0.1.5"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+ checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1"
+ dependencies = [
+ "unicode-bidi",
+ "unicode-normalization",
+ "unicode-properties",
+ ]
+
[[package]]
name = "strsim"
version = "0.11.1"
@@@ -9807,14 -9900,13 +10036,13 @@@ dependencies =
]
[[package]]
-name = "xattr"
-version = "1.6.1"
+name = "yaml-rust2"
+version = "0.10.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "32e45ad4206f6d2479085147f02bc2ef834ac85886624a23575ae137c8aa8156"
+checksum = "2462ea039c445496d8793d052e13787f2b90e750b833afee748e601c17621ed9"
dependencies = [
- "arraydeque",
- "encoding_rs",
- "hashlink",
+ "libc",
+ "rustix",
]
[[package]]
diff --cc Cargo.toml
index 8f9337063,9214191cb..247be4a56
--- a/Cargo.toml
+++ b/Cargo.toml
@@@ -95,8 -95,8 +95,9 @@@ dotenvy = "0.15.7
enum_dispatch = "0.3.13"
env_logger = "0.11.8"
figlet-rs = "0.1.5"
+ figment = { version = "0.10.19", features = ["toml", "env"] }
flume = "0.11.1"
+async-channel = "2.3.1"
futures = "0.3.31"
futures-util = "0.3.31"
human-repr = "1.1.0"
@@@ -114,12 -114,12 +115,10 @@@ mockall = "0.13.1
nonzero_lit = "0.1.2"
once_cell = "1.21.3"
passterm = "=2.0.1"
--postcard = { version = "1.1.3", features = ["alloc"] }
--predicates = "3.1.3"
--quinn = "0.11.9"
--rand = "0.9.2"
- regex = "1.11.2"
- reqwest = { version = "0.12.23", default-features = false, features = [
-regex = "1.12.2"
-reqwest = { version = "0.12.24", default-features = false, features = [
++quinn = "0.11.8"
++postcard = { version = "1.1.1", features = ["alloc"] }
++rand = "0.9.1"
++reqwest = { version = "0.12.20", default-features = false, features = [
"json",
"rustls-tls",
] }
@@@ -129,46 -129,24 +128,55 @@@ rust-s3 = { version = "0.37.0", default
"tokio-rustls-tls",
"tags",
] }
+rustls = { version = "0.23.31", features = ["ring"] }
+serde = { version = "1.0.225", features = ["derive", "rc"] }
+serde_json = "1.0.145"
+serde_with = { version = "3.14.0", features = ["base64", "macros"] }
+serde_yml = "0.0.12"
++rust-s3 = { version = "0.37.0", default-features = false, features = [
++ "tokio-rustls-tls",
++ "tags",
++] }
+ rustls = { version = "0.23.34", features = ["ring"] }
+ serde = { version = "1.0.228", features = ["derive", "rc"] }
+ serde_json = "1.0.145"
+ serde_with = { version = "3.15.1", features = ["base64", "macros"] }
+ serde_yaml_ng = "0.10.0"
serial_test = "3.2.0"
server = { path = "core/server" }
-simd-json = { version = "0.17.0", features = ["serde_impl"] }
+simd-json = { version = "0.15.1", features = ["serde_impl"] }
strum = { version = "0.27.2", features = ["derive"] }
strum_macros = "0.27.2"
-sysinfo = "0.37.2"
-tempfile = "3.23.0"
+sysinfo = "0.37.0"
+tempfile = "3.21.0"
test-case = "3.3.1"
-thiserror = "2.0.17"
-tokio = { version = "1.48.0", features = ["full"] }
-tokio-rustls = "0.26.4"
+thiserror = "2.0.16"
+tokio = { version = "1.47.1", features = ["full"] }
+compio = { git = "https://github.com/compio-rs/compio.git", rev = "fe4243f0b6811ebc325afd081c9b087b4d9817be", features = [
+ "runtime",
+ "macros",
+ "io-uring",
+ "time",
+ "rustls",
+] }
+cyper = { git = "https://github.com/krishvishal/cyper.git", rev = "cd75e266df6ab0a9b9474eb7dda1735650d17db6", features = [
+ "rustls",
+], default-features = false }
+cyper-axum = { git = "https://github.com/krishvishal/cyper", rev = "cd75e266df6ab0a9b9474eb7dda1735650d17db6" }
+compio-net = { git = "https://github.com/compio-rs/compio.git", rev = "fe4243f0b6811ebc325afd081c9b087b4d9817be" }
+compio-quic = { git = "https://github.com/compio-rs/compio.git", rev = "fe4243f0b6811ebc325afd081c9b087b4d9817be" }
+compio-tls = { git = "https://github.com/compio-rs/compio.git", rev = "fe4243f0b6811ebc325afd081c9b087b4d9817be", features = [
+ "rustls",
+] }
+compio-io = { git = "https://github.com/compio-rs/compio.git", rev = "fe4243f0b6811ebc325afd081c9b087b4d9817be" }
+compio-ws = { git = "https://github.com/krishvishal/compio-ws", features = [
+ "rustls",
+] }
+tungstenite = "0.27.0"
+tokio-tungstenite = { version = "0.27", features = ["rustls-tls-webpki-roots"] }
+tokio-rustls = "0.26.2"
tokio-util = { version = "0.7.16", features = ["compat"] }
-toml = "0.9.8"
+toml = "0.9.5"
tower-http = { version = "0.6.6", features = [
"add-extension",
"cors",
diff --cc DEPENDENCIES.md
index 34a7bc6d2,503423dfc..983f95ab9
--- a/DEPENDENCIES.md
+++ b/DEPENDENCIES.md
@@@ -258,16 -270,14 +270,14 @@@ futures-sink: 0.3.31, "Apache-2.0 OR MI
futures-task: 0.3.31, "Apache-2.0 OR MIT",
futures-timer: 3.0.3, "Apache-2.0 OR MIT",
futures-util: 0.3.31, "Apache-2.0 OR MIT",
- generator: 0.8.7, "Apache-2.0 OR MIT",
- generic-array: 0.14.7, "MIT",
+ generic-array: 0.14.9, "MIT",
getrandom: 0.2.16, "Apache-2.0 OR MIT",
- getrandom: 0.3.3, "Apache-2.0 OR MIT",
+ getrandom: 0.3.4, "Apache-2.0 OR MIT",
ghash: 0.5.1, "Apache-2.0 OR MIT",
gherkin: 0.14.0, "Apache-2.0 OR MIT",
- gimli: 0.31.1, "Apache-2.0 OR MIT",
git2: 0.20.2, "Apache-2.0 OR MIT",
--glob: 0.3.3, "Apache-2.0 OR MIT",
-globset: 0.4.18, "MIT OR Unlicense",
++glob: 0.3.2, "Apache-2.0 OR MIT",
+globset: 0.4.16, "MIT OR Unlicense",
globwalk: 0.9.1, "MIT",
gloo: 0.8.1, "Apache-2.0 OR MIT",
gloo: 0.10.0, "Apache-2.0 OR MIT",
diff --cc bdd/docker-compose.yml
index 40fd2c7a6,ab85afff3..86bbc9fa9
--- a/bdd/docker-compose.yml
+++ b/bdd/docker-compose.yml
@@@ -27,22 -27,10 +27,24 @@@ services
PREBUILT_IGGY_CLI: ${IGGY_CLI_PATH:-target/debug/iggy}
LIBC: glibc
PROFILE: debug
- command: ["--fresh"]
+ command: ["--fresh", "--with-default-root-credentials"]
+ cap_add:
+ - SYS_NICE
+ security_opt:
+ - seccomp:unconfined
+ ulimits:
+ memlock:
+ soft: -1
+ hard: -1
+ healthcheck:
+ test: ["CMD", "/usr/local/bin/iggy", "ping"]
+ interval: 1s
+ timeout: 3s
+ retries: 30
+ start_period: 2s
environment:
+ - IGGY_ROOT_USERNAME=iggy
+ - IGGY_ROOT_PASSWORD=iggy
- RUST_LOG=info
- IGGY_SYSTEM_PATH=local_data
- IGGY_TCP_ADDRESS=0.0.0.0:8090
diff --cc core/integration/src/test_server.rs
index 160094d26,372a44139..c1ebd0831
--- a/core/integration/src/test_server.rs
+++ b/core/integration/src/test_server.rs
@@@ -356,48 -325,11 +354,51 @@@ impl TestServer
sleep(Duration::from_millis(SLEEP_INTERVAL_MS));
continue;
}
- match file_config_provider.load_config().await {
+ match ServerConfig::file_config_provider(config_path.clone())
+ .load_config()
+ .await
+ {
Ok(config) => {
+ // Verify config contains fresh addresses, not stale defaults
+ // Default ports: TCP=8090, HTTP=3000, QUIC=8080, WebSocket=8092
+ let tcp_port: u16 = config
+ .tcp
+ .address
+ .split(':')
+ .nth(1)
+ .and_then(|s| s.parse().ok())
+ .unwrap_or(0);
+ let http_port: u16 = config
+ .http
+ .address
+ .split(':')
+ .nth(1)
+ .and_then(|s| s.parse().ok())
+ .unwrap_or(0);
+ let quic_port: u16 = config
+ .quic
+ .address
+ .split(':')
+ .nth(1)
+ .and_then(|s| s.parse().ok())
+ .unwrap_or(0);
+ let websocket_port: u16 = config
+ .websocket
+ .address
+ .split(':')
+ .nth(1)
+ .and_then(|s| s.parse().ok())
+ .unwrap_or(0);
+
+ if tcp_port == 8090
+ || http_port == 3000
+ || quic_port == 8080
+ || websocket_port == 8092
+ {
+ sleep(Duration::from_millis(SLEEP_INTERVAL_MS));
+ continue;
+ }
+
loaded_config = Some(config);
break;
}
diff --cc core/integration/tests/mod.rs
index 2adf4fd0c,2d36c1167..fb2156d8e
--- a/core/integration/tests/mod.rs
+++ b/core/integration/tests/mod.rs
@@@ -25,8 -25,10 +25,9 @@@ use std::sync::atomic::{AtomicBool, Ord
use std::sync::{Arc, Once};
use std::{panic, thread};
-mod archiver;
mod cli;
mod config_provider;
+ mod connectors;
mod data_integrity;
mod mcp;
mod sdk;
diff --cc core/server/Cargo.toml
index b94bd732c,e655a7db1..b1ca3d829
--- a/core/server/Cargo.toml
+++ b/core/server/Cargo.toml
@@@ -26,14 -26,15 +26,18 @@@ license = "Apache-2.0
normal = ["tracing-appender"]
[package.metadata.cargo-machete]
-ignored = ["rust-s3"]
+ignored = ["rusty-s3"]
+
+[[bin]]
+name = "iggy-server"
+path = "src/main.rs"
+ [[bin]]
+ name = "iggy-server"
+ path = "src/main.rs"
+
[features]
default = ["mimalloc"]
-tokio-console = ["dep:console-subscriber", "tokio/tracing"]
disable-mimalloc = []
mimalloc = ["dep:mimalloc"]
@@@ -65,25 -56,23 +69,26 @@@ dashmap = { workspace = true
derive_more = { workspace = true }
dotenvy = { workspace = true }
enum_dispatch = { workspace = true }
- error_set = { version = "0.8.5", features = ["tracing"] }
+ err_trail = { version = "0.9.0" }
+ error_set = { version = "0.9.0" }
figlet-rs = { workspace = true }
- figment = { version = "0.10.19", features = ["toml", "env"] }
+ figment = { workspace = true }
flume = { workspace = true }
+async-channel = { workspace = true }
futures = { workspace = true }
human-repr = { workspace = true }
iggy_common = { workspace = true }
-jsonwebtoken = { version = "10.1.0", features = ["rust_crypto"] }
+jsonwebtoken = "9.3.1"
+socket2 = "0.6.0"
lending-iterator = "0.1.7"
+hash32 = "1.0.0"
mimalloc = { workspace = true, optional = true }
- moka = { version = "0.12.10", features = ["future"] }
+ moka = { version = "0.12.11", features = ["future"] }
nix = { version = "0.30", features = ["fs"] }
once_cell = "1.21.3"
- opentelemetry = { version = "0.30.0", features = ["trace", "logs"] }
- opentelemetry-appender-tracing = { version = "0.30.1", features = ["log"] }
- opentelemetry-otlp = { version = "0.30.0", features = [
+ opentelemetry = { version = "0.31.0", features = ["trace", "logs"] }
+ opentelemetry-appender-tracing = { version = "0.31.1", features = ["log"] }
+ opentelemetry-otlp = { version = "0.31.0", features = [
"logs",
"trace",
"grpc-tonic",
@@@ -116,13 -106,14 +121,13 @@@ strum = { workspace = true
sysinfo = { workspace = true }
tempfile = { workspace = true }
thiserror = { workspace = true }
-tokio = { workspace = true }
-tokio-rustls = { workspace = true }
-tokio-util = { workspace = true }
+compio = { workspace = true }
toml = { workspace = true }
tower-http = { workspace = true }
+test-case = { workspace = true }
tracing = { workspace = true }
tracing-appender = { workspace = true }
- tracing-opentelemetry = "0.31.0"
+ tracing-opentelemetry = "0.32.0"
tracing-subscriber = { workspace = true }
twox-hash = { workspace = true }
ulid = "1.2.1"
diff --cc core/server/src/binary/handlers/consumer_groups/create_consumer_group_handler.rs
index 03a8a880b,5ada67ce6..c53c34f9e
--- a/core/server/src/binary/handlers/consumer_groups/create_consumer_group_handler.rs
+++ b/core/server/src/binary/handlers/consumer_groups/create_consumer_group_handler.rs
@@@ -75,17 -80,11 +75,17 @@@ impl ServerCommandHandler for CreateCon
}),
)
.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
- "{COMPONENT} (error: {error}) - failed to apply create consumer group for stream_id: {stream_id}, topic_id: {topic_id}, group_id: {group_id:?}, session: {session}"
+ "{COMPONENT} (error: {error}) - failed to apply create consumer group for stream_id: {stream_id}, topic_id: {topic_id}, group_id: {cg_id}, session: {session}"
)
})?;
+ let response = shard.streams.with_consumer_group_by_id(
+ &stream_id,
+ &topic_id,
+ &Identifier::numeric(cg_id as u32).unwrap(),
+ |(root, members)| mapper::map_consumer_group(root, members),
+ );
sender.send_ok_response(&response).await?;
Ok(())
}
diff --cc core/server/src/binary/handlers/consumer_groups/delete_consumer_group_handler.rs
index 024000242,5d4136a57..17d002d3d
--- a/core/server/src/binary/handlers/consumer_groups/delete_consumer_group_handler.rs
+++ b/core/server/src/binary/handlers/consumer_groups/delete_consumer_group_handler.rs
@@@ -19,17 -19,13 +19,17 @@@
use crate::binary::command::{BinaryServerCommand, ServerCommand, ServerCommandHandler};
use crate::binary::handlers::utils::receive_and_validate;
use crate::binary::{handlers::consumer_groups::COMPONENT, sender::SenderKind};
+
+use crate::shard::IggyShard;
+use crate::shard::transmission::event::ShardEvent;
+use crate::slab::traits_ext::EntityMarker;
use crate::state::command::EntryCommand;
use crate::streaming::session::Session;
-use crate::streaming::systems::system::SharedSystem;
use anyhow::Result;
- use error_set::ErrContext;
+ use err_trail::ErrContext;
use iggy_common::IggyError;
use iggy_common::delete_consumer_group::DeleteConsumerGroup;
+use std::rc::Rc;
use tracing::{debug, instrument};
impl ServerCommandHandler for DeleteConsumerGroup {
@@@ -98,10 -68,9 +98,10 @@@
&EntryCommand::DeleteConsumerGroup(self),
)
.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
- "{COMPONENT} (error: {error}) - failed to apply delete consumer group for stream_id: {stream_id}, topic_id: {topic_id}, group_id: {group_id:?}, session: {session}"
+ "{COMPONENT} (error: {error}) - failed to apply delete consumer group for stream_id: {}, topic_id: {}, group_id: {cg_id}, session: {session}",
+ stream_id, topic_id
)
})?;
sender.send_empty_ok_response().await?;
diff --cc core/server/src/binary/handlers/consumer_groups/join_consumer_group_handler.rs
index dc0af6031,c9544abe4..a018a9c3f
--- a/core/server/src/binary/handlers/consumer_groups/join_consumer_group_handler.rs
+++ b/core/server/src/binary/handlers/consumer_groups/join_consumer_group_handler.rs
@@@ -19,14 -19,12 +19,14 @@@
use crate::binary::command::{BinaryServerCommand, ServerCommand, ServerCommandHandler};
use crate::binary::handlers::utils::receive_and_validate;
use crate::binary::{handlers::consumer_groups::COMPONENT, sender::SenderKind};
+
+use crate::shard::IggyShard;
use crate::streaming::session::Session;
-use crate::streaming::systems::system::SharedSystem;
use anyhow::Result;
- use error_set::ErrContext;
+ use err_trail::ErrContext;
use iggy_common::IggyError;
use iggy_common::join_consumer_group::JoinConsumerGroup;
+use std::rc::Rc;
use tracing::{debug, instrument};
impl ServerCommandHandler for JoinConsumerGroup {
diff --cc core/server/src/binary/handlers/consumer_groups/leave_consumer_group_handler.rs
index 3b8013137,df429404f..e482627dd
--- a/core/server/src/binary/handlers/consumer_groups/leave_consumer_group_handler.rs
+++ b/core/server/src/binary/handlers/consumer_groups/leave_consumer_group_handler.rs
@@@ -16,18 -16,15 +16,18 @@@
* under the License.
*/
+use super::COMPONENT;
use crate::binary::command::{BinaryServerCommand, ServerCommand, ServerCommandHandler};
use crate::binary::handlers::utils::receive_and_validate;
-use crate::binary::{handlers::consumer_groups::COMPONENT, sender::SenderKind};
+use crate::binary::sender::SenderKind;
+
+use crate::shard::IggyShard;
use crate::streaming::session::Session;
-use crate::streaming::systems::system::SharedSystem;
use anyhow::Result;
- use error_set::ErrContext;
+ use err_trail::ErrContext;
use iggy_common::IggyError;
use iggy_common::leave_consumer_group::LeaveConsumerGroup;
+use std::rc::Rc;
use tracing::{debug, instrument};
impl ServerCommandHandler for LeaveConsumerGroup {
diff --cc core/server/src/binary/handlers/consumer_offsets/delete_consumer_offset_handler.rs
index c9850f921,2d0d7599c..c45a877b8
--- a/core/server/src/binary/handlers/consumer_offsets/delete_consumer_offset_handler.rs
+++ b/core/server/src/binary/handlers/consumer_offsets/delete_consumer_offset_handler.rs
@@@ -20,13 -20,12 +20,13 @@@ use crate::binary::command::{BinaryServ
use crate::binary::handlers::consumer_offsets::COMPONENT;
use crate::binary::handlers::utils::receive_and_validate;
use crate::binary::sender::SenderKind;
+use crate::shard::IggyShard;
use crate::streaming::session::Session;
-use crate::streaming::systems::system::SharedSystem;
use anyhow::Result;
- use error_set::ErrContext;
+ use err_trail::ErrContext;
use iggy_common::IggyError;
use iggy_common::delete_consumer_offset::DeleteConsumerOffset;
+use std::rc::Rc;
use tracing::debug;
impl ServerCommandHandler for DeleteConsumerOffset {
diff --cc core/server/src/binary/handlers/consumer_offsets/store_consumer_offset_handler.rs
index a53ef24ee,569e534a0..c41f3a6da
--- a/core/server/src/binary/handlers/consumer_offsets/store_consumer_offset_handler.rs
+++ b/core/server/src/binary/handlers/consumer_offsets/store_consumer_offset_handler.rs
@@@ -22,10 -20,10 +22,10 @@@ use crate::binary::command::{BinaryServ
use crate::binary::handlers::consumer_offsets::COMPONENT;
use crate::binary::handlers::utils::receive_and_validate;
use crate::binary::sender::SenderKind;
+use crate::shard::IggyShard;
use crate::streaming::session::Session;
-use crate::streaming::systems::system::SharedSystem;
use anyhow::Result;
- use error_set::ErrContext;
+ use err_trail::ErrContext;
use iggy_common::IggyError;
use iggy_common::store_consumer_offset::StoreConsumerOffset;
use tracing::debug;
diff --cc core/server/src/binary/handlers/messages/flush_unsaved_buffer_handler.rs
index 90c204d16,980a99f11..aa483fd82
--- a/core/server/src/binary/handlers/messages/flush_unsaved_buffer_handler.rs
+++ b/core/server/src/binary/handlers/messages/flush_unsaved_buffer_handler.rs
@@@ -19,12 -19,11 +19,12 @@@
use crate::binary::command::{BinaryServerCommand, ServerCommand, ServerCommandHandler};
use crate::binary::handlers::utils::receive_and_validate;
use crate::binary::{handlers::messages::COMPONENT, sender::SenderKind};
+use crate::shard::IggyShard;
use crate::streaming::session::Session;
-use crate::streaming::systems::system::SharedSystem;
use anyhow::Result;
- use error_set::ErrContext;
+ use err_trail::ErrContext;
use iggy_common::{FlushUnsavedBuffer, IggyError};
+use std::rc::Rc;
use tracing::{debug, instrument};
impl ServerCommandHandler for FlushUnsavedBuffer {
@@@ -47,20 -46,13 +47,20 @@@
let topic_id = self.topic_id.clone();
let partition_id = self.partition_id;
let fsync = self.fsync;
- system
- .flush_unsaved_buffer(session, stream_id, topic_id, partition_id, fsync)
+
+ shard
+ .flush_unsaved_buffer(
+ user_id,
+ self.stream_id,
+ self.topic_id,
+ partition_id as usize,
+ fsync,
+ )
.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to flush unsaved buffer for stream_id: {}, topic_id: {}, partition_id: {}, session: {}",
- self.stream_id, self.topic_id, self.partition_id, session
+ stream_id, topic_id, partition_id, session
)
})?;
sender.send_empty_ok_response().await?;
diff --cc core/server/src/binary/handlers/partitions/create_partitions_handler.rs
index 844c42d68,713c1ea44..537a03f35
--- a/core/server/src/binary/handlers/partitions/create_partitions_handler.rs
+++ b/core/server/src/binary/handlers/partitions/create_partitions_handler.rs
@@@ -19,18 -19,13 +19,18 @@@
use crate::binary::command::{BinaryServerCommand, ServerCommand, ServerCommandHandler};
use crate::binary::handlers::utils::receive_and_validate;
use crate::binary::{handlers::partitions::COMPONENT, sender::SenderKind};
+
+use crate::shard::IggyShard;
+use crate::shard::transmission::event::ShardEvent;
+use crate::slab::traits_ext::EntityMarker;
use crate::state::command::EntryCommand;
use crate::streaming::session::Session;
-use crate::streaming::systems::system::SharedSystem;
+use crate::streaming::{streams, topics};
use anyhow::Result;
- use error_set::ErrContext;
+ use err_trail::ErrContext;
use iggy_common::IggyError;
use iggy_common::create_partitions::CreatePartitions;
+use std::rc::Rc;
use tracing::{debug, instrument};
impl ServerCommandHandler for CreatePartitions {
diff --cc core/server/src/binary/handlers/partitions/delete_partitions_handler.rs
index d4947af72,7303a0a0b..1405cc65b
--- a/core/server/src/binary/handlers/partitions/delete_partitions_handler.rs
+++ b/core/server/src/binary/handlers/partitions/delete_partitions_handler.rs
@@@ -19,16 -19,13 +19,16 @@@
use crate::binary::command::{BinaryServerCommand, ServerCommand, ServerCommandHandler};
use crate::binary::handlers::utils::receive_and_validate;
use crate::binary::{handlers::partitions::COMPONENT, sender::SenderKind};
+
+use crate::shard::IggyShard;
+use crate::shard::transmission::event::ShardEvent;
use crate::state::command::EntryCommand;
use crate::streaming::session::Session;
-use crate::streaming::systems::system::SharedSystem;
use anyhow::Result;
- use error_set::ErrContext;
+ use err_trail::ErrContext;
use iggy_common::IggyError;
use iggy_common::delete_partitions::DeletePartitions;
+use std::rc::Rc;
use tracing::{debug, instrument};
impl ServerCommandHandler for DeletePartitions {
diff --cc core/server/src/binary/handlers/personal_access_tokens/create_personal_access_token_handler.rs
index 533890812,9b571a9b2..35e8866f4
--- a/core/server/src/binary/handlers/personal_access_tokens/create_personal_access_token_handler.rs
+++ b/core/server/src/binary/handlers/personal_access_tokens/create_personal_access_token_handler.rs
@@@ -20,17 -20,15 +20,17 @@@ use crate::binary::command::{BinaryServ
use crate::binary::handlers::utils::receive_and_validate;
use crate::binary::mapper;
use crate::binary::{handlers::personal_access_tokens::COMPONENT, sender::SenderKind};
+
+use crate::shard::IggyShard;
+use crate::shard::transmission::event::ShardEvent;
use crate::state::command::EntryCommand;
use crate::state::models::CreatePersonalAccessTokenWithHash;
-use crate::streaming::personal_access_tokens::personal_access_token::PersonalAccessToken;
use crate::streaming::session::Session;
-use crate::streaming::systems::system::SharedSystem;
use anyhow::Result;
- use error_set::ErrContext;
+ use err_trail::ErrContext;
use iggy_common::IggyError;
use iggy_common::create_personal_access_token::CreatePersonalAccessToken;
+use std::rc::Rc;
use tracing::{debug, instrument};
impl ServerCommandHandler for CreatePersonalAccessToken {
diff --cc core/server/src/binary/handlers/personal_access_tokens/delete_personal_access_token_handler.rs
index 9d88a5555,f9f7c3aab..188cea8bb
--- a/core/server/src/binary/handlers/personal_access_tokens/delete_personal_access_token_handler.rs
+++ b/core/server/src/binary/handlers/personal_access_tokens/delete_personal_access_token_handler.rs
@@@ -19,14 -19,13 +19,14 @@@
use crate::binary::command::{BinaryServerCommand, ServerCommand, ServerCommandHandler};
use crate::binary::handlers::utils::receive_and_validate;
use crate::binary::{handlers::personal_access_tokens::COMPONENT, sender::SenderKind};
+use crate::shard::IggyShard;
use crate::state::command::EntryCommand;
use crate::streaming::session::Session;
-use crate::streaming::systems::system::SharedSystem;
use anyhow::Result;
- use error_set::ErrContext;
+ use err_trail::ErrContext;
use iggy_common::IggyError;
use iggy_common::delete_personal_access_token::DeletePersonalAccessToken;
+use std::rc::Rc;
use tracing::{debug, instrument};
impl ServerCommandHandler for DeletePersonalAccessToken {
diff --cc core/server/src/binary/handlers/personal_access_tokens/login_with_personal_access_token_handler.rs
index 862297810,cae3f4720..8606fa99f
--- a/core/server/src/binary/handlers/personal_access_tokens/login_with_personal_access_token_handler.rs
+++ b/core/server/src/binary/handlers/personal_access_tokens/login_with_personal_access_token_handler.rs
@@@ -23,8 -21,9 +23,8 @@@ use crate::binary::handlers::utils::rec
use crate::binary::mapper;
use crate::binary::{handlers::personal_access_tokens::COMPONENT, sender::SenderKind};
use crate::streaming::session::Session;
-use crate::streaming::systems::system::SharedSystem;
use anyhow::Result;
- use error_set::ErrContext;
+ use err_trail::ErrContext;
use iggy_common::IggyError;
use iggy_common::login_with_personal_access_token::LoginWithPersonalAccessToken;
use tracing::{debug, instrument};
diff --cc core/server/src/binary/handlers/segments/delete_segments_handler.rs
index f174dfad3,71b7d23a0..c01430a1d
--- a/core/server/src/binary/handlers/segments/delete_segments_handler.rs
+++ b/core/server/src/binary/handlers/segments/delete_segments_handler.rs
@@@ -19,21 -19,13 +19,21 @@@
use crate::binary::command::{BinaryServerCommand, ServerCommand, ServerCommandHandler};
use crate::binary::handlers::utils::receive_and_validate;
use crate::binary::{handlers::partitions::COMPONENT, sender::SenderKind};
+
+use crate::shard::IggyShard;
+use crate::shard::namespace::IggyNamespace;
+use crate::shard::transmission::frame::ShardResponse;
+use crate::shard::transmission::message::{
+ ShardMessage, ShardRequest, ShardRequestPayload, ShardSendRequestResult,
+};
use crate::state::command::EntryCommand;
+use crate::streaming;
use crate::streaming::session::Session;
-use crate::streaming::systems::system::SharedSystem;
use anyhow::Result;
- use error_set::ErrContext;
+ use err_trail::ErrContext;
use iggy_common::IggyError;
use iggy_common::delete_segments::DeleteSegments;
+use std::rc::Rc;
use tracing::{debug, instrument};
impl ServerCommandHandler for DeleteSegments {
diff --cc core/server/src/binary/handlers/streams/delete_stream_handler.rs
index 4f2130ac7,2baaa2efd..4d162bbf8
--- a/core/server/src/binary/handlers/streams/delete_stream_handler.rs
+++ b/core/server/src/binary/handlers/streams/delete_stream_handler.rs
@@@ -19,17 -19,13 +19,17 @@@
use crate::binary::command::{BinaryServerCommand, ServerCommand, ServerCommandHandler};
use crate::binary::handlers::utils::receive_and_validate;
use crate::binary::{handlers::streams::COMPONENT, sender::SenderKind};
+use crate::shard::IggyShard;
+use crate::shard::transmission::event::ShardEvent;
+use crate::slab::traits_ext::EntityMarker;
use crate::state::command::EntryCommand;
use crate::streaming::session::Session;
-use crate::streaming::systems::system::SharedSystem;
use anyhow::Result;
- use error_set::ErrContext;
+ use err_trail::ErrContext;
use iggy_common::IggyError;
use iggy_common::delete_stream::DeleteStream;
+use std::rc::Rc;
+use tracing::info;
use tracing::{debug, instrument};
impl ServerCommandHandler for DeleteStream {
diff --cc core/server/src/binary/handlers/streams/get_streams_handler.rs
index a331b0732,044a34546..f6b192764
--- a/core/server/src/binary/handlers/streams/get_streams_handler.rs
+++ b/core/server/src/binary/handlers/streams/get_streams_handler.rs
@@@ -21,14 -21,12 +21,14 @@@ use crate::binary::handlers::streams::C
use crate::binary::handlers::utils::receive_and_validate;
use crate::binary::mapper;
use crate::binary::sender::SenderKind;
+use crate::shard::IggyShard;
+use crate::slab::traits_ext::{EntityComponentSystem, IntoComponents};
use crate::streaming::session::Session;
-use crate::streaming::systems::system::SharedSystem;
use anyhow::Result;
- use error_set::ErrContext;
+ use err_trail::ErrContext;
use iggy_common::IggyError;
use iggy_common::get_streams::GetStreams;
+use std::rc::Rc;
use tracing::debug;
impl ServerCommandHandler for GetStreams {
diff --cc core/server/src/binary/handlers/streams/purge_stream_handler.rs
index 40d40c085,1ebd31928..3dd8c66b3
--- a/core/server/src/binary/handlers/streams/purge_stream_handler.rs
+++ b/core/server/src/binary/handlers/streams/purge_stream_handler.rs
@@@ -19,16 -19,13 +19,16 @@@
use crate::binary::command::{BinaryServerCommand, ServerCommand, ServerCommandHandler};
use crate::binary::handlers::utils::receive_and_validate;
use crate::binary::{handlers::streams::COMPONENT, sender::SenderKind};
+
+use crate::shard::IggyShard;
+use crate::shard::transmission::event::ShardEvent;
use crate::state::command::EntryCommand;
use crate::streaming::session::Session;
-use crate::streaming::systems::system::SharedSystem;
use anyhow::Result;
- use error_set::ErrContext;
+ use err_trail::ErrContext;
use iggy_common::IggyError;
use iggy_common::purge_stream::PurgeStream;
+use std::rc::Rc;
use tracing::{debug, instrument};
impl ServerCommandHandler for PurgeStream {
diff --cc core/server/src/binary/handlers/streams/update_stream_handler.rs
index d6ec338fd,95841e990..18268a090
--- a/core/server/src/binary/handlers/streams/update_stream_handler.rs
+++ b/core/server/src/binary/handlers/streams/update_stream_handler.rs
@@@ -19,16 -19,13 +19,16 @@@
use crate::binary::command::{BinaryServerCommand, ServerCommand, ServerCommandHandler};
use crate::binary::handlers::utils::receive_and_validate;
use crate::binary::{handlers::streams::COMPONENT, sender::SenderKind};
+
+use crate::shard::IggyShard;
+use crate::shard::transmission::event::ShardEvent;
use crate::state::command::EntryCommand;
use crate::streaming::session::Session;
-use crate::streaming::systems::system::SharedSystem;
use anyhow::Result;
- use error_set::ErrContext;
+ use err_trail::ErrContext;
use iggy_common::IggyError;
use iggy_common::update_stream::UpdateStream;
+use std::rc::Rc;
use tracing::{debug, instrument};
impl ServerCommandHandler for UpdateStream {
diff --cc core/server/src/binary/handlers/topics/delete_topic_handler.rs
index 4cd215af6,3a0b23993..2056fc959
--- a/core/server/src/binary/handlers/topics/delete_topic_handler.rs
+++ b/core/server/src/binary/handlers/topics/delete_topic_handler.rs
@@@ -19,18 -19,13 +19,18 @@@
use crate::binary::command::{BinaryServerCommand, ServerCommand, ServerCommandHandler};
use crate::binary::handlers::utils::receive_and_validate;
use crate::binary::{handlers::topics::COMPONENT, sender::SenderKind};
+
+use crate::shard::IggyShard;
+use crate::shard::transmission::event::ShardEvent;
use crate::state::command::EntryCommand;
use crate::streaming::session::Session;
-use crate::streaming::systems::system::SharedSystem;
+use crate::streaming::streams;
use anyhow::Result;
- use error_set::ErrContext;
+ use err_trail::ErrContext;
use iggy_common::IggyError;
use iggy_common::delete_topic::DeleteTopic;
+use std::rc::Rc;
+use tracing::info;
use tracing::{debug, instrument};
impl ServerCommandHandler for DeleteTopic {
diff --cc core/server/src/binary/handlers/topics/purge_topic_handler.rs
index 2d1a67ab3,895cc5c49..a77ba38a3
--- a/core/server/src/binary/handlers/topics/purge_topic_handler.rs
+++ b/core/server/src/binary/handlers/topics/purge_topic_handler.rs
@@@ -19,14 -19,13 +19,14 @@@
use crate::binary::command::{BinaryServerCommand, ServerCommand, ServerCommandHandler};
use crate::binary::handlers::utils::receive_and_validate;
use crate::binary::{handlers::topics::COMPONENT, sender::SenderKind};
+use crate::shard::IggyShard;
use crate::state::command::EntryCommand;
use crate::streaming::session::Session;
-use crate::streaming::systems::system::SharedSystem;
use anyhow::Result;
- use error_set::ErrContext;
+ use err_trail::ErrContext;
use iggy_common::IggyError;
use iggy_common::purge_topic::PurgeTopic;
+use std::rc::Rc;
use tracing::{debug, instrument};
impl ServerCommandHandler for PurgeTopic {
@@@ -40,16 -39,14 +40,16 @@@
sender: &mut SenderKind,
_length: u32,
session: &Session,
- system: &SharedSystem,
+ shard: &Rc<IggyShard>,
) -> Result<(), IggyError> {
debug!("session: {session}, command: {self}");
- let system = system.read().await;
- system
+ let topic_id = self.topic_id.clone();
+ let stream_id = self.stream_id.clone();
+
+ shard
.purge_topic(session, &self.stream_id, &self.topic_id)
.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to purge topic with id: {}, stream_id: {}",
self.topic_id, self.stream_id
diff --cc core/server/src/binary/handlers/users/change_password_handler.rs
index aa84405b5,f572366ef..8c02b9c5d
--- a/core/server/src/binary/handlers/users/change_password_handler.rs
+++ b/core/server/src/binary/handlers/users/change_password_handler.rs
@@@ -19,18 -19,14 +19,18 @@@
use crate::binary::command::{BinaryServerCommand, ServerCommand, ServerCommandHandler};
use crate::binary::handlers::utils::receive_and_validate;
use crate::binary::{handlers::users::COMPONENT, sender::SenderKind};
+
+use crate::shard::IggyShard;
+use crate::shard::transmission::event::ShardEvent;
use crate::state::command::EntryCommand;
use crate::streaming::session::Session;
-use crate::streaming::systems::system::SharedSystem;
use crate::streaming::utils::crypto;
use anyhow::Result;
- use error_set::ErrContext;
+ use err_trail::ErrContext;
use iggy_common::IggyError;
use iggy_common::change_password::ChangePassword;
+use std::rc::Rc;
+use tracing::info;
use tracing::{debug, instrument};
impl ServerCommandHandler for ChangePassword {
diff --cc core/server/src/binary/handlers/users/delete_user_handler.rs
index c1e5a5478,9aa095958..6188411ae
--- a/core/server/src/binary/handlers/users/delete_user_handler.rs
+++ b/core/server/src/binary/handlers/users/delete_user_handler.rs
@@@ -21,16 -19,13 +21,16 @@@ use std::rc::Rc
use crate::binary::command::{BinaryServerCommand, ServerCommand, ServerCommandHandler};
use crate::binary::handlers::utils::receive_and_validate;
use crate::binary::{handlers::users::COMPONENT, sender::SenderKind};
+
+use crate::shard::IggyShard;
+use crate::shard::transmission::event::ShardEvent;
use crate::state::command::EntryCommand;
use crate::streaming::session::Session;
-use crate::streaming::systems::system::SharedSystem;
use anyhow::Result;
- use error_set::ErrContext;
+ use err_trail::ErrContext;
use iggy_common::IggyError;
use iggy_common::delete_user::DeleteUser;
+use tracing::info;
use tracing::{debug, instrument};
impl ServerCommandHandler for DeleteUser {
diff --cc core/server/src/binary/handlers/users/login_user_handler.rs
index 6c5b35d5b,04424e48a..26fe3c858
--- a/core/server/src/binary/handlers/users/login_user_handler.rs
+++ b/core/server/src/binary/handlers/users/login_user_handler.rs
@@@ -20,14 -20,13 +20,14 @@@ use crate::binary::command::{BinaryServ
use crate::binary::handlers::utils::receive_and_validate;
use crate::binary::mapper;
use crate::binary::{handlers::users::COMPONENT, sender::SenderKind};
+use crate::shard::IggyShard;
use crate::streaming::session::Session;
-use crate::streaming::systems::system::SharedSystem;
use anyhow::Result;
- use error_set::ErrContext;
+ use err_trail::ErrContext;
use iggy_common::IggyError;
use iggy_common::login_user::LoginUser;
-use tracing::{debug, instrument};
+use std::rc::Rc;
+use tracing::{debug, info, instrument, warn};
impl ServerCommandHandler for LoginUser {
fn code(&self) -> u32 {
diff --cc core/server/src/binary/handlers/users/logout_user_handler.rs
index 251a66c99,f9d54db88..10e246ea1
--- a/core/server/src/binary/handlers/users/logout_user_handler.rs
+++ b/core/server/src/binary/handlers/users/logout_user_handler.rs
@@@ -21,14 -19,12 +21,14 @@@ use std::rc::Rc
use crate::binary::command::{BinaryServerCommand, ServerCommand, ServerCommandHandler};
use crate::binary::handlers::utils::receive_and_validate;
use crate::binary::{handlers::users::COMPONENT, sender::SenderKind};
+
+use crate::shard::IggyShard;
use crate::streaming::session::Session;
-use crate::streaming::systems::system::SharedSystem;
use anyhow::Result;
- use error_set::ErrContext;
+ use err_trail::ErrContext;
use iggy_common::IggyError;
use iggy_common::logout_user::LogoutUser;
+use tracing::info;
use tracing::{debug, instrument};
impl ServerCommandHandler for LogoutUser {
diff --cc core/server/src/binary/handlers/users/update_permissions_handler.rs
index ebbc905c1,f842eca85..47d81d3ca
--- a/core/server/src/binary/handlers/users/update_permissions_handler.rs
+++ b/core/server/src/binary/handlers/users/update_permissions_handler.rs
@@@ -21,16 -19,13 +21,16 @@@ use std::rc::Rc
use crate::binary::command::{BinaryServerCommand, ServerCommand, ServerCommandHandler};
use crate::binary::handlers::utils::receive_and_validate;
use crate::binary::{handlers::users::COMPONENT, sender::SenderKind};
+
+use crate::shard::IggyShard;
+use crate::shard::transmission::event::ShardEvent;
use crate::state::command::EntryCommand;
use crate::streaming::session::Session;
-use crate::streaming::systems::system::SharedSystem;
use anyhow::Result;
- use error_set::ErrContext;
+ use err_trail::ErrContext;
use iggy_common::IggyError;
use iggy_common::update_permissions::UpdatePermissions;
+use tracing::info;
use tracing::{debug, instrument};
impl ServerCommandHandler for UpdatePermissions {
diff --cc core/server/src/binary/handlers/users/update_user_handler.rs
index 628a06bd6,7a6f46e34..f5160dd41
--- a/core/server/src/binary/handlers/users/update_user_handler.rs
+++ b/core/server/src/binary/handlers/users/update_user_handler.rs
@@@ -21,16 -19,13 +21,16 @@@ use std::rc::Rc
use crate::binary::command::{BinaryServerCommand, ServerCommand, ServerCommandHandler};
use crate::binary::handlers::utils::receive_and_validate;
use crate::binary::{handlers::users::COMPONENT, sender::SenderKind};
+
+use crate::shard::IggyShard;
+use crate::shard::transmission::event::ShardEvent;
use crate::state::command::EntryCommand;
use crate::streaming::session::Session;
-use crate::streaming::systems::system::SharedSystem;
use anyhow::Result;
- use error_set::ErrContext;
+ use err_trail::ErrContext;
use iggy_common::IggyError;
use iggy_common::update_user::UpdateUser;
+use tracing::info;
use tracing::{debug, instrument};
impl ServerCommandHandler for UpdateUser {
diff --cc core/server/src/configs/defaults.rs
index 7aed1e606,c30211f23..bef09df78
--- a/core/server/src/configs/defaults.rs
+++ b/core/server/src/configs/defaults.rs
@@@ -35,9 -35,10 +35,11 @@@ use crate::configs::system::
StateConfig, StreamConfig, SystemConfig, TopicConfig,
};
use crate::configs::tcp::{TcpConfig, TcpTlsConfig};
+use crate::configs::websocket::{WebSocketConfig, WebSocketTlsConfig};
use iggy_common::IggyByteSize;
use iggy_common::IggyDuration;
+ use iggy_common::TransportProtocol;
+ use std::str::FromStr;
use std::sync::Arc;
use std::time::Duration;
diff --cc core/server/src/configs/server.rs
index 83608bfcc,b7dcc56aa..245cf599f
--- a/core/server/src/configs/server.rs
+++ b/core/server/src/configs/server.rs
@@@ -23,10 -24,18 +23,19 @@@ use crate::configs::http::HttpConfig
use crate::configs::quic::QuicConfig;
use crate::configs::system::SystemConfig;
use crate::configs::tcp::TcpConfig;
+use crate::configs::websocket::WebSocketConfig;
use crate::server_error::ConfigError;
use derive_more::Display;
- use error_set::ErrContext;
+ use err_trail::ErrContext;
+ use figment::Metadata;
+ use figment::Profile;
+ use figment::Provider;
+ use figment::providers::Format;
+ use figment::providers::Toml;
+ use figment::value::Dict;
+ use iggy_common::ConfigProvider;
+ use iggy_common::CustomEnvProvider;
+ use iggy_common::FileConfigProvider;
use iggy_common::IggyDuration;
use iggy_common::Validatable;
use serde::{Deserialize, Serialize};
diff --cc core/server/src/configs/validators.rs
index ae6f037e5,7d64ec1d3..d5d97d1aa
--- a/core/server/src/configs/validators.rs
+++ b/core/server/src/configs/validators.rs
@@@ -39,42 -38,26 +39,32 @@@ use tracing::error
impl Validatable<ConfigError> for ServerConfig {
fn validate(&self) -> Result<(), ConfigError> {
- self.system
- .memory_pool
- .validate()
- .with_error_context(|error| {
- format!("{COMPONENT} (error: {error}) - failed to validate memory pool config")
- })?;
- self.data_maintenance
- .validate()
- .with_error_context(|error| {
- format!("{COMPONENT} (error: {error}) - failed to validate data maintenance config")
- })?;
- self.personal_access_token
- .validate()
- .with_error_context(|error| {
- format!(
- "{COMPONENT} (error: {error}) - failed to validate personal access token config"
- )
- })?;
- self.system.segment.validate().with_error_context(|error| {
+ self.system.memory_pool.validate().with_error(|error| {
+ format!("{COMPONENT} (error: {error}) - failed to validate memory pool config")
+ })?;
+ self.data_maintenance.validate().with_error(|error| {
+ format!("{COMPONENT} (error: {error}) - failed to validate data maintenance config")
+ })?;
+ self.personal_access_token.validate().with_error(|error| {
+ format!(
+ "{COMPONENT} (error: {error}) - failed to validate personal access token config"
+ )
+ })?;
+ self.system.segment.validate().with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to validate segment config")
})?;
- self.system
- .compression
- .validate()
- .with_error_context(|error| {
- format!("{COMPONENT} (error: {error}) - failed to validate compression config")
- })?;
- self.telemetry.validate().with_error_context(|error| {
+ self.system.compression.validate().with_error(|error| {
+ format!("{COMPONENT} (error: {error}) - failed to validate compression config")
+ })?;
+ self.telemetry.validate().with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to validate telemetry config")
})?;
+ self.system
+ .sharding
+ .validate()
+ .with_error_context(|error| {
+ format!("{COMPONENT} (error: {error}) - failed to validate sharding config")
+ })?;
let topic_size = match self.system.topic.max_size {
MaxTopicSize::Custom(size) => Ok(size.as_bytes_u64()),
@@@ -213,10 -196,13 +203,10 @@@ impl Validatable<ConfigError> for Messa
impl Validatable<ConfigError> for DataMaintenanceConfig {
fn validate(&self) -> Result<(), ConfigError> {
- self.archiver.validate().with_error(|error| {
- format!("{COMPONENT} (error: {error}) - failed to validate archiver config")
- })?;
- self.messages.validate().with_error(|error| {
+ self.messages.validate().with_error_context(|error| {
format!("{COMPONENT} (error: {error}) - failed to validate messages maintenance config")
})?;
- self.state.validate().with_error_context(|error| {
+ self.state.validate().with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to validate state maintenance config")
})?;
Ok(())
diff --cc core/server/src/http/jwt/storage.rs
index 3fa46367f,e7e73fa0e..f4923a930
--- a/core/server/src/http/jwt/storage.rs
+++ b/core/server/src/http/jwt/storage.rs
@@@ -22,9 -24,10 +22,9 @@@ use crate::
};
use ahash::AHashMap;
use anyhow::Context;
- use error_set::ErrContext;
+ use err_trail::ErrContext;
use iggy_common::IggyError;
use std::sync::Arc;
-use tokio::io::AsyncReadExt;
use tracing::{error, info};
#[derive(Debug)]
@@@ -44,20 -47,33 +44,20 @@@ impl TokenStorage
pub async fn load_all_revoked_access_tokens(
&self,
) -> Result<Vec<RevokedAccessToken>, IggyError> {
- let file = file::open(&self.path).await;
- if file.is_err() {
- info!("No revoked access tokens found to load.");
- return Ok(vec![]);
- }
+ // Check if file exists by trying to get metadata (equivalent to original file open check)
+ let file_size = match compio::fs::metadata(&self.path).await {
+ Err(_) => {
+ info!("No revoked access tokens found to load.");
+ return Ok(vec![]);
+ }
+ Ok(metadata) => metadata.len() as usize,
+ };
info!("Loading revoked access tokens from: {}", self.path);
- let mut file = file.map_err(|error| {
- error!("Cannot open revoked access tokens file: {error}");
- IggyError::CannotReadFile
- })?;
- let file_size = file
- .metadata()
- .await
- .with_error(|error| {
- format!(
- "{COMPONENT} (error: {error}) - failed to read file metadata, path: {}",
- self.path
- )
- })
- .map_err(|_| IggyError::CannotReadFileMetadata)?
- .len() as usize;
- let mut buffer = PooledBuffer::with_capacity(file_size);
- buffer.put_bytes(0, file_size);
- file.read_exact(&mut buffer)
+
+ let buffer = compio::fs::read(&self.path)
.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to read file into buffer, path: {}",
self.path
@@@ -105,9 -110,9 +105,9 @@@
.with_context(|| "Failed to serialize revoked access tokens")
.map_err(|_| IggyError::CannotSerializeResource)?;
self.persister
- .overwrite(&self.path, &bytes)
+ .overwrite(&self.path, bytes)
.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to overwrite file, path: {}",
self.path
@@@ -139,9 -144,9 +139,9 @@@
.with_context(|| "Failed to serialize revoked access tokens")
.map_err(|_| IggyError::CannotSerializeResource)?;
self.persister
- .overwrite(&self.path, &bytes)
+ .overwrite(&self.path, bytes)
.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to overwrite file, path: {}",
self.path
diff --cc core/server/src/http/system.rs
index 3741ec6af,be678ace3..da4990374
--- a/core/server/src/http/system.rs
+++ b/core/server/src/http/system.rs
@@@ -28,10 -28,10 +28,10 @@@ use axum::extract::{Path, State}
use axum::http::{HeaderMap, header};
use axum::response::IntoResponse;
use axum::routing::{get, post};
-use axum::{Extension, Json, Router};
+use axum::{Extension, Json, Router, debug_handler};
use bytes::Bytes;
use chrono::Local;
- use error_set::ErrContext;
+ use err_trail::ErrContext;
use iggy_common::Stats;
use iggy_common::Validatable;
use iggy_common::get_snapshot::GetSnapshot;
diff --cc core/server/src/quic/quic_server.rs
index e13cfcd41,1cd47a4f0..449e5c35f
--- a/core/server/src/quic/quic_server.rs
+++ b/core/server/src/quic/quic_server.rs
@@@ -162,12 -72,9 +160,10 @@@ fn configure_quic(config: &QuicConfig)
transport.datagram_send_buffer_size(config.datagram_send_buffer_size.as_bytes_u64() as usize);
transport.max_concurrent_bidi_streams(
VarInt::try_from(config.max_concurrent_bidi_streams)
- .with_error_context(|error| {
- format!("{COMPONENT} (error: {error}) - invalid bidi stream limit")
- })
+ .with_error(|error| format!("{COMPONENT} (error: {error}) - invalid bidi stream limit"))
.map_err(|_| QuicError::TransportConfigError)?,
);
+
if !config.keep_alive_interval.is_zero() {
transport.keep_alive_interval(Some(config.keep_alive_interval.get_duration()));
}
diff --cc core/server/src/server_error.rs
index 14cfbccec,d60604450..70ce206b2
--- a/core/server/src/server_error.rs
+++ b/core/server/src/server_error.rs
@@@ -16,27 -16,26 +16,27 @@@
* under the License.
*/
+use compio_quic::{ConnectionError as QuicConnectionError, ReadError, WriteError};
use error_set::error_set;
-use quinn::{ConnectionError as QuicConnectionError, ReadToEndError, WriteError};
+use rusty_s3::BucketError;
use std::array::TryFromSliceError;
-use tokio::io;
+use std::io;
error_set!(
- ServerError = ConfigError || ArchiverError || ConnectionError || LogError || CompatError || QuicError;
+ ServerError := ConfigError || ArchiverError || ConnectionError || LogError || CompatError || QuicError
- IoError = {
+ IoError := {
#[display("IO error")]
IoError(io::Error),
#[display("Write error")]
WriteError(WriteError),
- #[display("Read to end error")]
- ReadToEndError(ReadToEndError)
- }
+ #[display("Read error")]
+ ReadToEndError(ReadError)
+ };
- ConfigError = {
+ ConfigError := {
#[display("Invalid configuration provider: {}", provider_type)]
InvalidConfigurationProvider { provider_type: String },
@@@ -60,22 -59,16 +60,22 @@@
#[display("Invalid S3 credentials")]
InvalidS3Credentials,
+ #[display("HTTP request error: {0}")]
+ CyperError(cyper::Error),
+
+ #[display("Invalid S3 Bucket configuration")]
+ BucketError(BucketError),
+
#[display("Cannot archive file: {}", file_path)]
CannotArchiveFile { file_path: String },
- } || IoError;
+ } || IoError
- ConnectionError = {
+ ConnectionError := {
#[display("Connection error")]
QuicConnectionError(QuicConnectionError),
- } || IoError || CommonError;
+ } || IoError || CommonError
- LogError = {
+ LogError := {
#[display("Logging filter reload failure")]
FilterReloadFailure,
diff --cc core/server/src/shard/system/clients.rs
index fe7831ec8,58bb56867..cce06384a
--- a/core/server/src/shard/system/clients.rs
+++ b/core/server/src/shard/system/clients.rs
@@@ -71,27 -85,29 +71,27 @@@ impl IggyShard
&self,
session: &Session,
client_id: u32,
- ) -> Result<Option<IggySharedMut<Client>>, IggyError> {
+ ) -> Result<Option<Client>, IggyError> {
self.ensure_authenticated(session)?;
self.permissioner
+ .borrow()
.get_client(session.get_user_id())
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - permission denied to get client with ID: {client_id} by user ID: {}",
session.get_user_id()
)
})?;
- let client_manager = self.client_manager.read().await;
- Ok(client_manager.try_get_client(client_id))
+ Ok(self.client_manager.try_get_client(client_id))
}
- pub async fn get_clients(
- &self,
- session: &Session,
- ) -> Result<Vec<IggySharedMut<Client>>, IggyError> {
+ pub fn get_clients(&self, session: &Session) -> Result<Vec<Client>, IggyError> {
self.ensure_authenticated(session)?;
self.permissioner
+ .borrow()
.get_clients(session.get_user_id())
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to get clients by user ID {}",
session.get_user_id()
diff --cc core/server/src/shard/system/personal_access_tokens.rs
index c75acd51d,72d589954..b053cdb99
--- a/core/server/src/shard/system/personal_access_tokens.rs
+++ b/core/server/src/shard/system/personal_access_tokens.rs
@@@ -16,12 -16,12 +16,12 @@@
* under the License.
*/
+use super::COMPONENT;
+use crate::shard::IggyShard;
use crate::streaming::personal_access_tokens::personal_access_token::PersonalAccessToken;
use crate::streaming::session::Session;
-use crate::streaming::systems::COMPONENT;
-use crate::streaming::systems::system::System;
use crate::streaming::users::user::User;
- use error_set::ErrContext;
+ use err_trail::ErrContext;
use iggy_common::IggyError;
use iggy_common::IggyExpiry;
use iggy_common::IggyTimestamp;
@@@ -63,10 -61,10 +61,10 @@@ impl IggyShard
let user_id = session.get_user_id();
let identifier = user_id.try_into()?;
{
- let user = self.get_user(&identifier).with_error_context(|error| {
+ let user = self.get_user(&identifier).with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to get user with id: {user_id}")
})?;
- let max_token_per_user = self.personal_access_token.max_tokens_per_user;
+ let max_token_per_user = self.config.personal_access_token.max_tokens_per_user;
if user.personal_access_tokens.len() as u32 >= max_token_per_user {
error!(
"User with ID: {user_id} has reached the maximum number of personal access tokens: {max_token_per_user}.",
diff --cc core/server/src/shard/system/storage.rs
index 3e9fa1829,d8a724a79..a098e4927
--- a/core/server/src/shard/system/storage.rs
+++ b/core/server/src/shard/system/storage.rs
@@@ -87,9 -83,9 +87,9 @@@ impl FileSystemInfoStorage
.with_context(|| "Failed to serialize system info")
.map_err(|_| IggyError::CannotSerializeResource)?;
self.persister
- .overwrite(&self.path, &data)
+ .overwrite(&self.path, data)
.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to overwrite file at path: {}",
self.path
diff --cc core/server/src/shard/transmission/id.rs
index 8921dca02,000000000..0cbb6b96b
mode 100644,000000..100644
--- a/core/server/src/shard/transmission/id.rs
+++ b/core/server/src/shard/transmission/id.rs
@@@ -1,43 -1,0 +1,68 @@@
++<<<<<<<< HEAD:core/server/src/shard/transmission/id.rs
+/* Licensed to the Apache Software Foundation (ASF) under one
++========
++/**
++ * Licensed to the Apache Software Foundation (ASF) under one
++>>>>>>>> master:foreign/node/src/examples/utils.ts
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
++<<<<<<<< HEAD:core/server/src/shard/transmission/id.rs
+use std::ops::Deref;
+
+// TODO: Maybe pad to cache line size?
+#[derive(Debug, Clone, Copy, Eq, PartialEq)]
+pub struct ShardId {
+ id: u16,
+}
+
+impl ShardId {
+ pub fn new(id: u16) -> Self {
+ Self { id }
+ }
+
+ pub fn id(&self) -> u16 {
+ self.id
+ }
+}
+
+impl Deref for ShardId {
+ type Target = u16;
+
+ fn deref(&self) -> &Self::Target {
+ &self.id
+ }
+}
++========
++
++import { Client } from '../index.js';
++import { getIggyAddress } from '../tcp.sm.utils.js';
++
++
++export const getClient = () => {
++ const [host, port] = getIggyAddress();
++ const credentials = { username: 'iggy', password: 'iggy' };
++
++ const opt = {
++ transport: 'TCP' as const,
++ options: { host, port },
++ credentials
++ };
++
++ return new Client(opt);
++};
++>>>>>>>> master:foreign/node/src/examples/utils.ts
diff --cc core/server/src/state/file.rs
index cc6de3be1,d2859e5f3..46f930765
--- a/core/server/src/state/file.rs
+++ b/core/server/src/state/file.rs
@@@ -80,13 -80,27 +80,14 @@@ impl FileState
pub fn term(&self) -> u64 {
self.term.load(Ordering::SeqCst)
}
-}
-impl State for FileState {
- async fn init(&self) -> Result<Vec<StateEntry>, IggyError> {
- if !Path::new(&self.path).exists() {
- info!("State file does not exist, creating a new one");
- self.persister
- .overwrite(&self.path, &[])
- .await
- .with_error(|error| {
- format!(
- "{COMPONENT} (error: {error}) - failed to overwrite state file, path: {}",
- self.path
- )
- })?;
- }
+ pub async fn init(&self) -> Result<Vec<StateEntry>, IggyError> {
+ assert!(Path::new(&self.path).exists());
- let entries = self.load_entries().await.with_error_context(|error| {
- format!("{COMPONENT} (error: {error}) - failed to load entries")
- })?;
+ let entries = self
+ .load_entries()
+ .await
+ .with_error(|error| format!("{COMPONENT} (error: {error}) - failed to load entries"))?;
let entries_count = entries.len() as u64;
self.entries_count.store(entries_count, Ordering::SeqCst);
if entries_count == 0 {
@@@ -140,14 -153,13 +141,14 @@@
let mut current_index = 0;
let mut entries_count = 0;
loop {
- let index = reader
+ let index = cursor
.read_u64_le()
.await
- .with_error_context(|error| format!("{FILE_STATE_PARSE_ERROR} index. {error}"))
+ .with_error(|error| format!("{FILE_STATE_PARSE_ERROR} index. {error}"))
.map_err(|_| IggyError::InvalidNumberEncoding)?;
total_size += 8;
- if entries_count > 0 && index != current_index + 1 {
+ // Greater than one, because one of the entries after a fresh reboot is the default root user.
+ if entries_count > 1 && index != current_index + 1 {
error!(
"State file is corrupted, expected index: {}, got: {}",
current_index + 1,
@@@ -158,56 -170,54 +159,54 @@@
current_index = index;
entries_count += 1;
- let term = reader
+ let term = cursor
.read_u64_le()
.await
- .with_error_context(|error| format!("{FILE_STATE_PARSE_ERROR} term. {error}"))
+ .with_error(|error| format!("{FILE_STATE_PARSE_ERROR} term. {error}"))
.map_err(|_| IggyError::InvalidNumberEncoding)?;
total_size += 8;
- let leader_id = reader
+ let leader_id = cursor
.read_u32_le()
.await
- .with_error_context(|error| format!("{FILE_STATE_PARSE_ERROR} leader_id. {error}"))
+ .with_error(|error| format!("{FILE_STATE_PARSE_ERROR} leader_id. {error}"))
.map_err(|_| IggyError::InvalidNumberEncoding)?;
total_size += 4;
- let version = reader
+ let version = cursor
.read_u32_le()
.await
- .with_error_context(|error| format!("{FILE_STATE_PARSE_ERROR} version. {error}"))
+ .with_error(|error| format!("{FILE_STATE_PARSE_ERROR} version. {error}"))
.map_err(|_| IggyError::InvalidNumberEncoding)?;
total_size += 4;
- let flags = reader
+ let flags = cursor
.read_u64_le()
.await
- .with_error_context(|error| format!("{FILE_STATE_PARSE_ERROR} flags. {error}"))
+ .with_error(|error| format!("{FILE_STATE_PARSE_ERROR} flags. {error}"))
.map_err(|_| IggyError::InvalidNumberEncoding)?;
total_size += 8;
let timestamp = IggyTimestamp::from(
- reader
+ cursor
.read_u64_le()
.await
- .with_error_context(|error| {
- format!("{FILE_STATE_PARSE_ERROR} timestamp. {error}")
- })
+ .with_error(|error| format!("{FILE_STATE_PARSE_ERROR} timestamp. {error}"))
.map_err(|_| IggyError::InvalidNumberEncoding)?,
);
total_size += 8;
- let user_id = reader
+ let user_id = cursor
.read_u32_le()
.await
- .with_error_context(|error| format!("{FILE_STATE_PARSE_ERROR} user_id. {error}"))
+ .with_error(|error| format!("{FILE_STATE_PARSE_ERROR} user_id. {error}"))
.map_err(|_| IggyError::InvalidNumberEncoding)?;
total_size += 4;
- let checksum = reader
+ let checksum = cursor
.read_u32_le()
.await
- .with_error_context(|error| format!("{FILE_STATE_PARSE_ERROR} checksum. {error}"))
+ .with_error(|error| format!("{FILE_STATE_PARSE_ERROR} checksum. {error}"))
.map_err(|_| IggyError::InvalidNumberEncoding)?;
total_size += 4;
- let context_length = reader
+ let context_length = cursor
.read_u32_le()
.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!("{FILE_STATE_PARSE_ERROR} context context_length. {error}")
})
.map_err(|_| IggyError::InvalidNumberEncoding)?
@@@ -222,18 -231,16 +221,16 @@@
.map_err(|_| IggyError::CannotReadFile)?;
let context = context.freeze();
total_size += context_length as u64;
- let code = reader
+ let code = cursor
.read_u32_le()
.await
- .with_error_context(|error| format!("{FILE_STATE_PARSE_ERROR} code. {error}"))
+ .with_error(|error| format!("{FILE_STATE_PARSE_ERROR} code. {error}"))
.map_err(|_| IggyError::InvalidNumberEncoding)?;
total_size += 4;
- let mut command_length = reader
+ let mut command_length = cursor
.read_u32_le()
.await
- .with_error_context(|error| {
- format!("{FILE_STATE_PARSE_ERROR} command_length. {error}")
- })
+ .with_error(|error| format!("{FILE_STATE_PARSE_ERROR} command_length. {error}"))
.map_err(|_| IggyError::InvalidNumberEncoding)?
as usize;
total_size += 4;
@@@ -354,12 -361,11 +351,12 @@@
command,
);
let bytes = entry.to_bytes();
+ let len = bytes.len();
self.entries_count.fetch_add(1, Ordering::SeqCst);
self.persister
- .append(&self.path, &bytes)
+ .append(&self.path, bytes)
.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!(
"{COMPONENT} (error: {error}) - failed to append state entry data to file, path: {}, data size: {}",
self.path,
diff --cc core/server/src/streaming/persistence/persister.rs
index 8f5be92b0,4b917e715..8a960275f
--- a/core/server/src/streaming/persistence/persister.rs
+++ b/core/server/src/streaming/persistence/persister.rs
@@@ -57,11 -68,29 +57,11 @@@ impl PersisterKind
#[derive(Debug)]
pub struct FilePersister;
-#[derive(Debug)]
-pub struct FileWithSyncPersister;
-
-impl Persister for FilePersister {
- async fn append(&self, path: &str, bytes: &[u8]) -> Result<(), IggyError> {
- let mut file = file::append(path)
+impl FilePersister {
+ pub async fn append<B: IoBuf>(&self, path: &str, bytes: B) -> Result<(), IggyError> {
+ let (mut file, position) = file::append(path)
.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to append to file: {path}")
})
.map_err(|_| IggyError::CannotAppendToFile)?;
@@@ -75,10 -103,10 +75,10 @@@
Ok(())
}
- async fn overwrite(&self, path: &str, bytes: &[u8]) -> Result<(), IggyError> {
+ pub async fn overwrite<B: IoBuf>(&self, path: &str, bytes: B) -> Result<(), IggyError> {
let mut file = file::overwrite(path)
.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to overwrite file: {path}")
})
.map_err(|_| IggyError::CannotOverwriteFile)?;
@@@ -93,10 -119,10 +93,10 @@@
Ok(())
}
- async fn delete(&self, path: &str) -> Result<(), IggyError> {
- fs::remove_file(path)
+ pub async fn delete(&self, path: &str) -> Result<(), IggyError> {
+ remove_file(path)
.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to delete file: {path}")
})
.map_err(|_| IggyError::CannotDeleteFile)?;
@@@ -104,14 -130,11 +104,14 @@@
}
}
-impl Persister for FileWithSyncPersister {
- async fn append(&self, path: &str, bytes: &[u8]) -> Result<(), IggyError> {
- let mut file = file::append(path)
+#[derive(Debug)]
+pub struct FileWithSyncPersister;
+
+impl FileWithSyncPersister {
+ pub async fn append<B: IoBuf>(&self, path: &str, bytes: B) -> Result<(), IggyError> {
+ let (mut file, position) = file::append(path)
.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to append to file: {path}")
})
.map_err(|_| IggyError::CannotAppendToFile)?;
@@@ -133,10 -155,10 +133,10 @@@
Ok(())
}
- async fn overwrite(&self, path: &str, bytes: &[u8]) -> Result<(), IggyError> {
+ pub async fn overwrite<B: IoBuf>(&self, path: &str, bytes: B) -> Result<(), IggyError> {
let mut file = file::overwrite(path)
.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to overwrite file: {path}")
})
.map_err(|_| IggyError::CannotOverwriteFile)?;
@@@ -159,10 -179,10 +159,10 @@@
Ok(())
}
- async fn delete(&self, path: &str) -> Result<(), IggyError> {
- fs::remove_file(path)
+ pub async fn delete(&self, path: &str) -> Result<(), IggyError> {
+ remove_file(path)
.await
- .with_error_context(|error| {
+ .with_error(|error| {
format!("{COMPONENT} (error: {error}) - failed to delete file: {path}")
})
.map_err(|_| IggyError::CannotDeleteFile)?;
diff --cc core/server/src/streaming/segments/indexes/index_writer.rs
index 4e77766c6,ca4c982ee..94e7a99aa
--- a/core/server/src/streaming/segments/indexes/index_writer.rs
+++ b/core/server/src/streaming/segments/indexes/index_writer.rs
@@@ -49,11 -47,12 +49,11 @@@ impl IndexWriter
file_exists: bool,
) -> Result<Self, IggyError> {
let file = OpenOptions::new()
- .write(true)
- .append(true)
.create(true)
+ .write(true)
.open(file_path)
.await
- .with_error_context(|error| format!("Failed to open index file: {file_path}. {error}"))
+ .with_error(|error| format!("Failed to open index file: {file_path}. {error}"))
.map_err(|_| IggyError::CannotReadFile)?;
if file_exists {