diff --git a/src/traft/node.rs b/src/traft/node.rs index 0fd881310321a4b765ae4932f5dc9cb5ef973643..fb1d9ffd12360a2ca222d4496df182904deed873 100644 --- a/src/traft/node.rs +++ b/src/traft/node.rs @@ -1303,7 +1303,10 @@ impl NodeImpl { } } - // FIXME: this should just be BatchDml + // TODO: this operation is just a set of Dml::Delete operations, + // however doing this via CaS would be nightmare. It would be much + // simpler if we supported FOREIGN KEY/ON DELETE CASCADE + // semantics, but we don't... Op::Plugin(PluginRaftOp::RemovePlugin { ident }) => { let maybe_plugin = self .storage diff --git a/src/traft/op.rs b/src/traft/op.rs index 3cb317cef228e1962ae10a2dd022a674b6098614..93ff29bf5815cfe793208b046005c1be3d572d6a 100644 --- a/src/traft/op.rs +++ b/src/traft/op.rs @@ -816,7 +816,12 @@ pub enum PluginRaftOp { }, /// Disable selected plugin. DisablePlugin { ident: PluginIdentifier }, - /// Remove selected plugin. + /// Remove records for the given plugin and records in other tables which + /// indirectly depend on it (foreign keys). + /// + /// Note that in an ideal world this Op can be replaced with a BatchDml, but + /// in practice the code would be a nightmare to write and maintain. + /// It would be much easier if we supported FOREIGN KEY/ON DELETE CASCADE. RemovePlugin { ident: PluginIdentifier }, }