@@ -85,7 +85,11 @@ pub struct Reschedule {
85
85
}
86
86
87
87
/// Replacing an old job with a new one. All actors in the job will be rebuilt.
88
- /// Used for `ALTER TABLE` ([`Command::ReplaceStreamJob`]) and sink into table ([`Command::CreateStreamingJob`]).
88
+ ///
89
+ /// Current use cases:
90
+ /// - `ALTER SOURCE` (via [`Command::ReplaceStreamJob`]) will replace a source job's plan.
91
+ /// - `ALTER TABLE` (via [`Command::ReplaceStreamJob`]) and `CREATE SINK INTO table` ([`Command::CreateStreamingJob`])
92
+ /// will replace a table job's plan.
89
93
#[ derive( Debug , Clone ) ]
90
94
pub struct ReplaceStreamJobPlan {
91
95
pub old_fragments : StreamJobFragments ,
@@ -102,7 +106,7 @@ pub struct ReplaceStreamJobPlan {
102
106
pub init_split_assignment : SplitAssignment ,
103
107
/// The `StreamingJob` info of the table to be replaced. Must be `StreamingJob::Table`
104
108
pub streaming_job : StreamingJob ,
105
- /// The temporary dummy table fragments id of new table fragment
109
+ /// The temporary dummy job fragments id of new table fragment
106
110
pub tmp_id : u32 ,
107
111
}
108
112
@@ -264,7 +268,7 @@ pub enum Command {
264
268
///
265
269
/// Barriers from the actors to be dropped will STILL be collected.
266
270
/// After the barrier is collected, it notifies the local stream manager of compute nodes to
267
- /// drop actors, and then delete the table fragments info from meta store.
271
+ /// drop actors, and then delete the job fragments info from meta store.
268
272
DropStreamingJobs {
269
273
table_fragments_ids : HashSet < TableId > ,
270
274
actors : Vec < ActorId > ,
@@ -278,7 +282,7 @@ pub enum Command {
278
282
/// be collected since the barrier should be passthrough.
279
283
///
280
284
/// After the barrier is collected, these newly created actors will be marked as `Running`. And
281
- /// it adds the table fragments info to meta store. However, the creating progress will **last
285
+ /// it adds the job fragments info to meta store. However, the creating progress will **last
282
286
/// for a while** until the `finish` channel is signaled, then the state of `TableFragments`
283
287
/// will be set to `Created`.
284
288
CreateStreamingJob {
@@ -302,16 +306,16 @@ pub enum Command {
302
306
} ,
303
307
304
308
/// `ReplaceStreamJob` command generates a `Update` barrier with the given `merge_updates`. This is
305
- /// essentially switching the downstream of the old table fragments to the new ones, and
306
- /// dropping the old table fragments. Used for table schema change.
309
+ /// essentially switching the downstream of the old job fragments to the new ones, and
310
+ /// dropping the old job fragments. Used for table schema change.
307
311
///
308
312
/// This can be treated as a special case of `RescheduleFragment`, while the upstream fragment
309
313
/// of the Merge executors are changed additionally.
310
314
ReplaceStreamJob ( ReplaceStreamJobPlan ) ,
311
315
312
- /// `SourceSplitAssignment ` generates a `Splits` barrier for pushing initialized splits or
316
+ /// `SourceChangeSplit ` generates a `Splits` barrier for pushing initialized splits or
313
317
/// changed splits.
314
- SourceSplitAssignment ( SplitAssignment ) ,
318
+ SourceChangeSplit ( SplitAssignment ) ,
315
319
316
320
/// `Throttle` command generates a `Throttle` barrier with the given throttle config to change
317
321
/// the `rate_limit` of `FlowControl` Executor after `StreamScan` or Source.
@@ -416,7 +420,7 @@ impl Command {
416
420
) ,
417
421
Command :: ReplaceStreamJob ( plan) => Some ( plan. fragment_changes ( ) ) ,
418
422
Command :: MergeSnapshotBackfillStreamingJobs ( _) => None ,
419
- Command :: SourceSplitAssignment ( _) => None ,
423
+ Command :: SourceChangeSplit ( _) => None ,
420
424
Command :: Throttle ( _) => None ,
421
425
Command :: CreateSubscription { .. } => None ,
422
426
Command :: DropSubscription { .. } => None ,
@@ -640,7 +644,7 @@ impl Command {
640
644
}
641
645
}
642
646
643
- Command :: SourceSplitAssignment ( change) => {
647
+ Command :: SourceChangeSplit ( change) => {
644
648
let mut diff = HashMap :: new ( ) ;
645
649
646
650
for actor_splits in change. values ( ) {
0 commit comments