Skip to content

Commit 18cca2e

Browse files
committed
feat: Add replication management functionality to ClusterClient
- Introduced ReplicationsClient for handling replication operations. - Added methods for initiating, listing, cancelling, and deleting replication operations. - Implemented ReplicationOperationTracker for monitoring replication status asynchronously. - Enhanced error handling with WeaviateNotFoundException for replication resources. - Created models for replication operations, including ReplicationType and ReplicationOperationState. - Updated WeaviateRestClient with new endpoints for replication operations. - Added necessary DTOs for replication requests and responses.
1 parent 3f17a9d commit 18cca2e

File tree

15 files changed

+2273
-8
lines changed

15 files changed

+2273
-8
lines changed

.markdownlint.jsonc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"MD013": false
3+
}

ci/compose.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ function compose_down_all {
2323
}
2424

2525
function all_weaviate_ports {
26-
echo "8080"
26+
# Include single-node default and multi-node cluster compose exposed REST ports
27+
echo "8080 8087 8088 8089"
2728
}
2829

2930
function wait(){

ci/docker-compose-cluster.yml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
services:
2+
weaviate-node-1:
3+
image: semitechnologies/weaviate:${WEAVIATE_VERSION}
4+
restart: on-failure:0
5+
ports:
6+
- "8087:8080"
7+
- "50058:50051"
8+
environment:
9+
QUERY_DEFAULTS_LIMIT: 20
10+
AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: 'true'
11+
PERSISTENCE_DATA_PATH: "./weaviate-node-1"
12+
CLUSTER_HOSTNAME: "node1"
13+
CLUSTER_GOSSIP_BIND_PORT: "7110"
14+
CLUSTER_DATA_BIND_PORT: "7111"
15+
RAFT_PORT: '8300'
16+
RAFT_INTERNAL_RPC_PORT: "8301"
17+
RAFT_JOIN: "node1:8300,node2:8300,node3:8300"
18+
RAFT_BOOTSTRAP_EXPECT: "3"
19+
DISABLE_TELEMETRY: 'true'
20+
DEFAULT_VECTORIZER_MODULE: text2vec-transformers
21+
ENABLE_MODULES: text2vec-transformers
22+
AUTOSCHEMA_ENABLED: 'false'
23+
REPLICA_MOVEMENT_ENABLED: 'true'
24+
TRANSFORMERS_INFERENCE_API: http://transformers:8080
25+
26+
weaviate-node-2:
27+
init: true
28+
command:
29+
- --host
30+
- 0.0.0.0
31+
- --port
32+
- '8080'
33+
- --scheme
34+
- http
35+
image: semitechnologies/weaviate:${WEAVIATE_VERSION}
36+
ports:
37+
- 8088:8080
38+
- "50059:50051"
39+
restart: on-failure:0
40+
environment:
41+
LOG_LEVEL: 'debug'
42+
QUERY_DEFAULTS_LIMIT: 20
43+
AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: 'true'
44+
PERSISTENCE_DATA_PATH: './weaviate-node-2'
45+
CLUSTER_HOSTNAME: 'node2'
46+
CLUSTER_GOSSIP_BIND_PORT: '7110'
47+
CLUSTER_DATA_BIND_PORT: '7111'
48+
CLUSTER_JOIN: 'weaviate-node-1:7110'
49+
RAFT_PORT: '8300'
50+
RAFT_INTERNAL_RPC_PORT: "8301"
51+
RAFT_JOIN: "node1:8300,node2:8300,node3:8300"
52+
RAFT_BOOTSTRAP_EXPECT: "3"
53+
DISABLE_TELEMETRY: 'true'
54+
DEFAULT_VECTORIZER_MODULE: text2vec-transformers
55+
ENABLE_MODULES: text2vec-transformers
56+
AUTOSCHEMA_ENABLED: 'false'
57+
REPLICA_MOVEMENT_ENABLED: 'true'
58+
TRANSFORMERS_INFERENCE_API: http://transformers:8080
59+
60+
weaviate-node-3:
61+
init: true
62+
command:
63+
- --host
64+
- 0.0.0.0
65+
- --port
66+
- '8080'
67+
- --scheme
68+
- http
69+
image: semitechnologies/weaviate:${WEAVIATE_VERSION}
70+
ports:
71+
- 8089:8080
72+
- "50060:50051"
73+
restart: on-failure:0
74+
environment:
75+
LOG_LEVEL: 'debug'
76+
QUERY_DEFAULTS_LIMIT: 20
77+
AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: 'true'
78+
PERSISTENCE_DATA_PATH: './weaviate-node-2'
79+
CLUSTER_HOSTNAME: 'node3'
80+
CLUSTER_GOSSIP_BIND_PORT: '7110'
81+
CLUSTER_DATA_BIND_PORT: '7111'
82+
CLUSTER_JOIN: 'weaviate-node-1:7110'
83+
RAFT_PORT: '8300'
84+
RAFT_INTERNAL_RPC_PORT: "8301"
85+
RAFT_JOIN: "node1:8300,node2:8300,node3:8300"
86+
RAFT_BOOTSTRAP_EXPECT: "3"
87+
DISABLE_TELEMETRY: 'true'
88+
DEFAULT_VECTORIZER_MODULE: text2vec-transformers
89+
ENABLE_MODULES: text2vec-transformers
90+
AUTOSCHEMA_ENABLED: 'false'
91+
REPLICA_MOVEMENT_ENABLED: 'true'
92+
TRANSFORMERS_INFERENCE_API: http://transformers:8080
93+
...

ci/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ services:
2121
BACKUP_FILESYSTEM_PATH: "/tmp/backups"
2222
CLUSTER_GOSSIP_BIND_PORT: "7100"
2323
CLUSTER_DATA_BIND_PORT: "7101"
24-
CLUSTER_HOSTNAME: "node1"
24+
CLUSTER_HOSTNAME: "singlenode"
2525
AUTOSCHEMA_ENABLED: 'false'
2626
DISABLE_TELEMETRY: 'true'
2727
DISABLE_LAZY_LOAD_SHARDS: 'true'

0 commit comments

Comments
 (0)