-
Notifications
You must be signed in to change notification settings - Fork 198
feat(resync): Add support to update snapshot config (max_parallel_workers, num_tables, rows_per_partition) during resync signal #4276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
c614269
57c205f
44e8ffb
6924494
114a505
b4253db
9050b10
8439ee7
33d8eca
1dd91bf
f586af9
3790e5c
0370fd8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -93,6 +93,25 @@ func LogActivityStartFlowConfigUpdate(ctx context.Context, flowName string, upda | |
| changes = append(changes, fmt.Sprintf("tables removed: %v", removedTables)) | ||
| } | ||
|
|
||
| if update.BatchSize > 0 { | ||
| changes = append(changes, fmt.Sprintf("batchSize: %v", update.BatchSize)) | ||
| } | ||
| if update.IdleTimeout > 0 { | ||
| changes = append(changes, fmt.Sprintf("idleTimeout: %v", update.IdleTimeout)) | ||
| } | ||
| if update.SnapshotNumPartitionsOverride > 0 { | ||
| changes = append(changes, fmt.Sprintf("snapshotNumPartitionsOverride: %v", update.SnapshotNumPartitionsOverride)) | ||
| } | ||
| if update.SnapshotMaxParallelWorkers > 0 { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks for adding this to activity logging as well!
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: for same of completion, let's include batchSize, idleTimeout, snapshotNumPartitionsOverride to match
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The caller here will actually pass all values, changed and unchanged, and the flow-api can't distinguish which ones to log. Logging the list of tables has to happen here because they're not applied to the config until snapshotting is done, so keeping just tables and leaving the rest to the worker is better.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay |
||
| changes = append(changes, fmt.Sprintf("snapshotMaxParallelWorkers: %v", update.SnapshotMaxParallelWorkers)) | ||
| } | ||
| if update.SnapshotNumTablesInParallel > 0 { | ||
| changes = append(changes, fmt.Sprintf("snapshotNumTablesInParallel: %v", update.SnapshotNumTablesInParallel)) | ||
| } | ||
| if update.SnapshotNumRowsPerPartition > 0 { | ||
| changes = append(changes, fmt.Sprintf("snapshotNumRowsPerPartition: %v", update.SnapshotNumRowsPerPartition)) | ||
| } | ||
|
|
||
| logActivity(ctx, ActionStartFlowConfigUpdate, | ||
| slog.String("flowName", flowName), | ||
| slog.String("activityDetails", strings.Join(changes, ", "))) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: i may regret saying this (lol) but for now we are not validating these snapshot parameters so we could just remove it altogether.
maybe can add a comment here mentioning that. this avoids having update these config fields.