Skip to content

Commit 68fb600

Browse files
authored
refactor(meta): adopt external crate for shared state machine logic (#17609)
* refactor(meta): adopt `databendlabs/map-api` crate for shared state machine logic This commit replaces the internal map API implementation with the external crate `databendlabs/map-api`. ### Context: In the future, the meta-service codebase will be shared across two main products: 1. A Raft-based meta-service. 2. An S3-based meta-service. The state machine logic for these services is largely identical and should be effectively shared to maximize code reuse and maintainability. Using the `databendlabs/map-api` crate facilitates this shared implementation. * refactor(meta): adopt `databendlabs/watcher` crate for shared state machine logic
1 parent 0389734 commit 68fb600

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+96
-3102
lines changed

โ€ŽCargo.lock

Lines changed: 28 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

โ€ŽCargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ members = [
9797
"src/meta/embedded",
9898
"src/meta/kvapi",
9999
"src/meta/process",
100-
"src/meta/map-api",
101100
"src/meta/raft-store",
102101
"src/meta/sled-store",
103102
"src/meta/stoerr",
@@ -107,7 +106,6 @@ members = [
107106
"src/meta/proto-conv",
108107
"src/meta/protos",
109108
"src/meta/service",
110-
"src/meta/watcher",
111109
"tests/sqllogictests",
112110
"src/tests/sqlsmith",
113111
]
@@ -144,14 +142,12 @@ databend-common-meta-client = { path = "src/meta/client" }
144142
databend-common-meta-control = { path = "src/meta/control" }
145143
databend-common-meta-embedded = { path = "src/meta/embedded" }
146144
databend-common-meta-kvapi = { path = "src/meta/kvapi" }
147-
databend-common-meta-map-api = { path = "src/meta/map-api" }
148145
databend-common-meta-process = { path = "src/meta/process" }
149146
databend-common-meta-raft-store = { path = "src/meta/raft-store" }
150147
databend-common-meta-sled-store = { path = "src/meta/sled-store" }
151148
databend-common-meta-stoerr = { path = "src/meta/stoerr" }
152149
databend-common-meta-store = { path = "src/meta/store" }
153150
databend-common-meta-types = { path = "src/meta/types" }
154-
databend-common-meta-watcher = { path = "src/meta/watcher" }
155151
databend-common-metrics = { path = "src/common/metrics" }
156152
databend-common-native = { path = "src/common/native" }
157153
databend-common-openai = { path = "src/common/openai" }
@@ -359,6 +355,7 @@ logforth = { version = "0.14", features = [
359355
'fastrace',
360356
] }
361357
lz4 = "1.24.0"
358+
map-api = { version = "0.2.1" }
362359
maplit = "1.0.2"
363360
match-template = "0.0.1"
364361
md-5 = "0.10.5"
@@ -514,6 +511,7 @@ url = "2.5.4"
514511
uuid = { version = "1.10.0", features = ["std", "serde", "v4", "v7"] }
515512
volo-thrift = "0.10"
516513
walkdir = "2.3.2"
514+
watcher = { version = "0.1.0" }
517515
wiremock = "0.6"
518516
wkt = "0.10.3"
519517
xorf = { version = "0.11.0", default-features = false, features = ["binary-fuse"] }
@@ -634,6 +632,7 @@ backtrace = { git = "https://github.com/rust-lang/backtrace-rs.git", rev = "7226
634632
color-eyre = { git = "https://github.com/eyre-rs/eyre.git", rev = "e5d92c3" }
635633
deltalake = { git = "https://github.com/delta-io/delta-rs", rev = "c149502" }
636634
ethnum = { git = "https://github.com/datafuse-extras/ethnum-rs", rev = "4cb05f1" }
635+
map-api = { git = "https://github.com/databendlabs/map-api", tag = "v0.2.1" }
637636
openai_api_rust = { git = "https://github.com/datafuse-extras/openai-api", rev = "819a0ed" }
638637
openraft = { git = "https://github.com/databendlabs/openraft", tag = "v0.10.0-alpha.7" }
639638
orc-rust = { git = "https://github.com/youngsofun/orc-rust", rev = "94ab8e9" }
@@ -642,4 +641,5 @@ sled = { git = "https://github.com/datafuse-extras/sled", tag = "v0.34.7-datafus
642641
tantivy = { git = "https://github.com/datafuse-extras/tantivy", rev = "7502370" }
643642
tantivy-common = { git = "https://github.com/datafuse-extras/tantivy", rev = "7502370", package = "tantivy-common" }
644643
tantivy-jieba = { git = "https://github.com/datafuse-extras/tantivy-jieba", rev = "0e300e9" }
644+
watcher = { git = "https://github.com/databendlabs/watcher", tag = "v0.1.0" }
645645
xorfilter-rs = { git = "https://github.com/datafuse-extras/xorfilter", tag = "databend-alpha.4" }

โ€Žsrc/meta/map-api/Cargo.toml

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
ย (0)