Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support horaedb submit compaction task to remote #1563

Open
wants to merge 56 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
c1729f4
feat: add compaction server supporting remote compaction service
LeslieKid Jul 18, 2024
41f166b
fix style.
LeslieKid Jul 21, 2024
51666ca
fix style.
LeslieKid Jul 22, 2024
3d007e1
define error for compaction service.
LeslieKid Jul 23, 2024
453b22c
enable conversation from request to task.
LeslieKid Jul 23, 2024
b549119
update remote compact execution.
LeslieKid Jul 23, 2024
ec60fdc
enable conversation from task result to response.
LeslieKid Jul 25, 2024
d3b4db2
introduce CompactionCluster for compaction server in distribute mode.
LeslieKid Aug 5, 2024
798dd41
enable compaction cluster deployment.
LeslieKid Aug 6, 2024
cd7c9ae
refactor: replace CompactionCluster with ClusterType.
LeslieKid Aug 7, 2024
818d61f
remove compaction cluster,
LeslieKid Aug 7, 2024
31a306c
fix style and comment.
LeslieKid Aug 7, 2024
29894f8
provide cluster type for communication between horaedb/cs (as client)…
LeslieKid Aug 7, 2024
12f135a
introduce compaction client for horaedb to access remote compaction n…
LeslieKid Aug 12, 2024
a999f41
impl compact in Cluster trait.
LeslieKid Aug 14, 2024
165c18d
fix style and add comment.
LeslieKid Aug 14, 2024
f306c14
impl type conversation.
LeslieKid Aug 16, 2024
c01ef00
remove dead code.
LeslieKid Aug 16, 2024
e170f65
Merge branch 'main' into remote-compaction-service
LeslieKid Aug 16, 2024
f2c0e38
remove cluster type in meta client.
LeslieKid Aug 16, 2024
421d2c0
Merge branch 'main' into remote-compaction-service
LeslieKid Aug 16, 2024
c6521a4
fix bug
LeslieKid Aug 16, 2024
723a533
update Cargo.lock
LeslieKid Aug 16, 2024
3da8fe5
fix style.
LeslieKid Aug 20, 2024
debabab
rename ClusterType to NodeType.
LeslieKid Aug 20, 2024
03af564
fix style.
LeslieKid Aug 21, 2024
16d1f3d
impl default.
LeslieKid Aug 26, 2024
32a53af
support meta client to fetch compaction node and send heartbeat with …
LeslieKid Aug 27, 2024
56fe903
feat: analytic engine can support compaction offload
LeslieKid Aug 30, 2024
8eff59d
support conversation from compaction runner task to execute compactio…
LeslieKid Aug 31, 2024
142d8dc
update Cargo.toml (tmp)
LeslieKid Aug 31, 2024
4b72e32
fix bug.
LeslieKid Sep 2, 2024
b01a4b0
update docs for cluster deployment.
LeslieKid Sep 2, 2024
e78dc84
impl RemoteCompactionRunner.
LeslieKid Sep 3, 2024
1c98627
refactor: place remote compact logic into RemoteCompactionRunner inst…
LeslieKid Sep 10, 2024
20bfc80
Merge branch 'main' into remote-compactor
LeslieKid Sep 10, 2024
cdacd6d
Merge branch 'main' into remote-compactor
LeslieKid Sep 12, 2024
282d886
fix bug.
LeslieKid Sep 20, 2024
efe99bd
remove unnecessary NodeType in Cluster.
LeslieKid Sep 18, 2024
b553a85
Merge branch 'main' into remote-compactor
LeslieKid Sep 20, 2024
b7b810d
impl local compaction node picker.
LeslieKid Sep 22, 2024
f31c2c8
Merge branch 'remote-compactor' of github.com:LeslieKid/horaedb into …
LeslieKid Sep 22, 2024
5cf33b2
use compaction mode instead of compaction offload for analytic engine…
LeslieKid Sep 23, 2024
bf3b67c
remove unnecessary NodeType.
LeslieKid Sep 24, 2024
1beaa16
add serde tag for compaction mode.
LeslieKid Sep 24, 2024
158a529
fix style.
LeslieKid Sep 25, 2024
86cebbb
delete part of docs for cluster config.
LeslieKid Sep 27, 2024
317d248
impl simple error handle for remote compaction runner.
LeslieKid Sep 27, 2024
708cf5c
Merge branch 'main' into remote-compactor
LeslieKid Sep 28, 2024
7efa88c
move compaction client to compaction runner crate.
Rachelint Sep 30, 2024
2f36208
sort out codes for compation service.
Rachelint Sep 30, 2024
d03c4c5
redirect horaedbproto to apache repo.
Rachelint Sep 30, 2024
0e6fe29
remove unnecessary field in compaction service.
LeslieKid Oct 1, 2024
0b821cc
introduce fallback_local_when_failed in remote compaction runner.
LeslieKid Oct 1, 2024
b3ef9a5
make endpoint formatted.
LeslieKid Oct 1, 2024
f07dcd2
fix fmt.
LeslieKid Oct 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ license = "Apache-2.0"
[workspace]
resolver = "2"
# In alphabetical order
members = [
members = [
"horaectl",
"integration_tests",
"integration_tests/sdk/rust",
Expand All @@ -33,7 +33,8 @@ members = [
"src/catalog",
"src/catalog_impls",
"src/cluster",
"src/common_types",
"src/common_types",
"src/compaction_client",
"src/components/alloc_tracker",
"src/components/arena",
"src/components/arrow_ext",
Expand Down Expand Up @@ -101,7 +102,8 @@ thiserror = "1"
bytes_ext = { path = "src/components/bytes_ext" }
catalog = { path = "src/catalog" }
catalog_impls = { path = "src/catalog_impls" }
horaedbproto = { git = "https://github.com/apache/incubator-horaedb-proto.git", rev = "a5874d9fedee32ab1292252c4eb6defc4f6e245a" }
# TODO(leslie): modify it when the related pr in incubator-horaedb-proto is merged.
horaedbproto = { git = "https://github.com/LeslieKid/incubator-horaedb-proto.git", rev = "84f72744efc6e5f2e3a3ad8bbb24b807e383c492" }
codec = { path = "src/components/codec" }
chrono = "0.4"
clap = { version = "4.5.1", features = ["derive"] }
Expand All @@ -110,6 +112,7 @@ cluster = { path = "src/cluster" }
criterion = "0.5"
horaedb-client = "1.0.2"
common_types = { path = "src/common_types" }
compaction_client = { path = "src/compaction_client" }
datafusion = { git = "https://github.com/CeresDB/arrow-datafusion.git", rev = "e21b03154" }
datafusion-proto = { git = "https://github.com/CeresDB/arrow-datafusion.git", rev = "e21b03154" }
derive_builder = "0.12"
Expand Down
62 changes: 62 additions & 0 deletions docs/example-cluster-3.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# 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.

[node]
addr = "127.0.0.1"

[logger]
level = "info"

[server]
bind_addr = "0.0.0.0"
http_port = 5442
grpc_port = 8833
mysql_port = 23307
deploy_mode = "Cluster"

[analytic]
compaction_offload = true

[analytic.storage]
mem_cache_capacity = '1G'
mem_cache_partition_bits = 0

[analytic.storage.object_store]
type = "Local"
data_dir = "/tmp/horaedb0"

[analytic.wal]
type = "RocksDB"
data_dir = "/tmp/horaedb0"

[cluster_deployment]
mode = "WithMeta"
cmd_channel_buffer_size = 10

[cluster_deployment.meta_client]
# Only support "defaultCluster" currently.
cluster_name = "defaultCluster"
meta_addr = "http://127.0.0.1:2379"
lease = "10s"
timeout = "5s"

[cluster_deployment.etcd_client]
server_addrs = ['127.0.0.1:2379']

[limiter]
write_block_list = ['mytable1']
read_block_list = ['mytable1']
61 changes: 61 additions & 0 deletions docs/example-cluster-4.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# 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.

[node]
addr = "127.0.0.1"

[logger]
level = "debug"

[server]
bind_addr = "0.0.0.0"
http_port = 5443
grpc_port = 8834
mysql_port = 33307
postgresql_port = 25433
deploy_mode = "Cluster"

[analytic.storage]
mem_cache_capacity = '1G'
mem_cache_partition_bits = 0

[analytic.storage.object_store]
type = "Local"
data_dir = "/tmp/horaedb1"

[analytic.wal]
type = "RocksDB"
data_dir = "/tmp/horaedb1"

[cluster_deployment]
mode = "WithMeta"
cmd_channel_buffer_size = 10
node_type = "CompactionServer"

[cluster_deployment.meta_client]
# Only support "defaultCluster" currently.
cluster_name = "defaultCluster"
meta_addr = "http://127.0.0.1:2379"
lease = "10s"
timeout = "5s"

[cluster_deployment.etcd_client]
server_addrs = ['127.0.0.1:2379']

[limiter]
write_block_list = ['mytable1']
read_block_list = ['mytable1']
3 changes: 3 additions & 0 deletions src/analytic_engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ async-trait = { workspace = true }
atomic_enum = { workspace = true }
base64 = { workspace = true }
bytes_ext = { workspace = true }
cluster = { workspace = true }
codec = { workspace = true }
common_types = { workspace = true }
compaction_client = { workspace = true }
datafusion = { workspace = true }
future_ext = { workspace = true }
futures = { workspace = true }
Expand All @@ -65,6 +67,7 @@ logger = { workspace = true }
lru = { workspace = true }
macros = { workspace = true }
message_queue = { workspace = true }
meta_client = { workspace = true }
metric_ext = { workspace = true }
object_store = { workspace = true }
parquet = { workspace = true }
Expand Down
Loading
Loading