Skip to content

Commit

Permalink
fix: fill source id before creating source in compute node (#1806)
Browse files Browse the repository at this point in the history
* fix: fill source id before creating source in compute node

* change kafka/zk port in risedev.yml
  • Loading branch information
hzxa21 authored Apr 13, 2022
1 parent 5575b70 commit 946ae60
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 9 deletions.
17 changes: 15 additions & 2 deletions risedev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,19 @@ risedev:
- use: compute-node
- use: frontend
user-managed: true

full:
- use: minio
- use: etcd
- use: meta-node
- use: compute-node
- use: frontend
- use: prometheus
- use: grafana
- use: zookeeper
persist-data: true
- use: kafka
persist-data: true

#################################
### Configurations used on CI ###
Expand Down Expand Up @@ -346,7 +359,7 @@ template:
address: "127.0.0.1"

# Listen port of Kafka
port: 39092
port: 29092

# ZooKeeper used by this Kafka instance
provide-zookeeper: "zookeeper*"
Expand All @@ -366,7 +379,7 @@ template:
address: "127.0.0.1"

# Listen port of ZooKeeper
port: 32888
port: 2181

# If set to true, data will be persisted at data/{id}.
persist-data: true
12 changes: 6 additions & 6 deletions scripts/source/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3'

services:
zookeeper:
image: ghcr.io/singularity-data/cp-zookeeper:7.0.1
image: confluentinc/cp-zookeeper:7.0.1
hostname: zookeeper
container_name: zookeeper
ports:
Expand All @@ -12,7 +12,7 @@ services:
ZOOKEEPER_TICK_TIME: 2000

broker:
image: ghcr.io/singularity-data/cp-kafka:7.0.1
image: confluentinc/cp-kafka:7.0.1
hostname: broker
container_name: broker
depends_on:
Expand All @@ -37,7 +37,7 @@ services:
start_period: 10s

kafkacat:
image: ghcr.io/singularity-data/kafkacat:1.6.0
image: confluentinc/cp-kafkacat:7.1.0
container_name: kafkacat
depends_on:
- broker
Expand All @@ -47,7 +47,7 @@ services:
tty: true

mysql:
image: ghcr.io/singularity-data/debezium-example-mysql:1.8.0.Final
image: debezium/example-mysql:1.8.0.Final
hostname: mysql
container_name: mysql
ports:
Expand All @@ -58,7 +58,7 @@ services:
- MYSQL_PASSWORD=mysqlpw

debezium:
image: ghcr.io/singularity-data/debezium-connect:1.8.0.Final
image: debezium/connect:1.8.0.Final
hostname: debezium
container_name: debezium
ports:
Expand All @@ -74,7 +74,7 @@ services:
- STATUS_STORAGE_TOPIC=my_connect_statuses

dbgen:
image: ghcr.io/singularity-data/tpch-dbgen:ubuntu # tabbbb/tpch-dbgen:ubuntu
image: tabbbb/tpch-dbgen:ubuntu # tabbbb/tpch-dbgen:ubuntu
hostname: dbgen
container_name: dbgen
entrypoint: /bin/sh
Expand Down
3 changes: 2 additions & 1 deletion src/meta/src/rpc/service/ddl_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,14 @@ where
.generate::<{ IdCategory::Table }>()
.await
.map_err(tonic_err)? as u32;
source.id = id;

self.catalog_manager
.start_create_source_procedure(&source)
.await
.map_err(tonic_err)?;

// QUESTION(patrick): why do we need to contact compute node on create source
if let Err(e) = self.source_manager.create_source(&source).await {
self.catalog_manager
.cancel_create_source_procedure(&source)
Expand All @@ -185,7 +187,6 @@ where
return Err(e.to_grpc_status());
}

source.id = id;
let version = self
.catalog_manager
.finish_create_source_procedure(&source)
Expand Down

0 comments on commit 946ae60

Please sign in to comment.