Skip to content

Commit

Permalink
allow more ddl command in recovery
Browse files Browse the repository at this point in the history
  • Loading branch information
wenym1 committed Oct 31, 2024
1 parent 3f619a2 commit 5c0aab6
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/meta/src/rpc/ddl_controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,20 @@ impl DdlCommand {
| DdlCommand::DropSecret(_)
| DdlCommand::AlterName(_, _)
| DdlCommand::AlterObjectOwner(_, _)
| DdlCommand::AlterSetSchema(_, _) => true,

// Simply ban all other commands in recovery.
_ => false,
| DdlCommand::AlterSetSchema(_, _)
| DdlCommand::CreateDatabase(_)
| DdlCommand::CreateSchema(_)
| DdlCommand::CreateFunction(_)
| DdlCommand::CreateView(_)
| DdlCommand::CreateConnection(_)
| DdlCommand::CommentOn(_)
| DdlCommand::CreateSecret(_) => true,
DdlCommand::CreateStreamingJob(_, _, _, _)
| DdlCommand::CreateSourceWithoutStreamingJob(_)
| DdlCommand::ReplaceTable(_)
| DdlCommand::AlterSourceColumn(_)
| DdlCommand::CreateSubscription(_)
| DdlCommand::DropSubscription(_, _) => false,
}
}
}
Expand Down

0 comments on commit 5c0aab6

Please sign in to comment.