Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
xxhZs committed May 6, 2024
1 parent 3728162 commit dea0db6
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 17 deletions.
25 changes: 15 additions & 10 deletions src/frontend/src/observer/observer_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,16 +294,21 @@ impl FrontendObserverNode {
Operation::Update => catalog_guard.update_sink(sink),
_ => panic!("receive an unsupported notify {:?}", resp),
},
RelationInfo::Subscription(subscription) => match resp.operation() {
Operation::Add => catalog_guard.create_subscription(subscription),
Operation::Delete => catalog_guard.drop_subscription(
subscription.database_id,
subscription.schema_id,
subscription.id,
),
Operation::Update => catalog_guard.update_subscription(subscription),
_ => panic!("receive an unsupported notify {:?}", resp),
},
RelationInfo::Subscription(subscription) => {
println!("subscription: {:?}", resp);
match resp.operation() {
Operation::Add => catalog_guard.create_subscription(subscription),
Operation::Delete => catalog_guard.drop_subscription(
subscription.database_id,
subscription.schema_id,
subscription.id,
),
Operation::Update => {
catalog_guard.update_subscription(subscription)
}
_ => panic!("receive an unsupported notify {:?}", resp),
}
}
RelationInfo::Index(index) => match resp.operation() {
Operation::Add => catalog_guard.create_index(index),
Operation::Delete => catalog_guard.drop_index(
Expand Down
16 changes: 9 additions & 7 deletions src/meta/src/controller/catalog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -483,15 +483,17 @@ impl CatalogController {
.await?
.ok_or_else(|| MetaError::catalog_id_not_found("subscription", job_id))?;

let relations = vec![PbRelation {
relation_info: Some(PbRelationInfo::Subscription(
ObjectModel(subscription, obj.unwrap()).into(),
)),
}];
let version = self
.notify_frontend(
NotificationOperation::Add,
NotificationInfo::RelationGroup(PbRelationGroup { relations }),
Operation::Add,
Info::RelationGroup(PbRelationGroup {
relations: vec![PbRelation {
relation_info: PbRelationInfo::Subscription(
ObjectModel(subscription, obj.unwrap()).into(),
)
.into(),
}],
}),
)
.await;
Ok(version)
Expand Down

0 comments on commit dea0db6

Please sign in to comment.