- This will restart replication for all {affectedTables.length} table - {affectedTables.length === 1 ? '' : 's'} in this pipeline from scratch: -
-- This will restart replication for all{' '} - {affectedTables.length} currently failed tables from scratch: -
-No additional initial sync charge
- This restart will skip initial sync based on the pipeline's settings. + This reset will skip initial sync based on the pipeline’s settings.
- A cost estimate is unavailable. You can still restart the{' '} +
+ A cost estimate is unavailable. You can still reset the{' '} {tables.length === 1 ? 'table' : 'tables'}.
)} {restartEstimate?.isComplete && restartEstimate.hasRowFilteredTables && ( -+
*Row filters can reduce the data processed compared with this estimate.
)} {restartEstimate?.isComplete && ( -+
Quick planning estimate; the final charge is based on successfully processed initial sync data, which is billed again.
diff --git a/apps/studio/components/interfaces/Database/Replication/RestartTableDialog.tsx b/apps/studio/components/interfaces/Database/Replication/RestartTableDialog.tsx index c9cb1f8b4c5..01441eb6ca9 100644 --- a/apps/studio/components/interfaces/Database/Replication/RestartTableDialog.tsx +++ b/apps/studio/components/interfaces/Database/Replication/RestartTableDialog.tsx @@ -44,19 +44,18 @@ export const RestartTableDialog = ({ const pipelineId = Number(_pipelineId) const tableName = `${table.schema}.${table.name}` const willCopyTable = shouldCopyTable(tableSyncCopy, table.id) + const pipelineAction = pipelineStatusName === PipelineStatusName.STOPPED ? 'start' : 'restart' const { mutate: rollbackTables, isPending: isResetting } = useRollbackTablesMutation({ onSuccess: () => { - toast.success( - `Restarting replication for "${tableName}". Pipeline will ${pipelineStatusName === PipelineStatusName.STOPPED ? 'start' : 'restart'} automatically.` - ) + toast.success(`Resetting "${tableName}". Pipeline will ${pipelineAction} automatically.`) }, onSettled: () => { onRestartComplete?.() onOpenChange(false) }, onError: (error) => { - toast.error(`Failed to restart replication: ${error.message}`) + toast.error(`Failed to reset table: ${error.message}`) }, }) @@ -74,47 +73,16 @@ export const RestartTableDialog = ({ }) } + const consequence = willCopyTable + ? `Destination data for this table will be deleted, existing rows will sync again, and the pipeline will ${pipelineAction} automatically.` + : `Destination data for this table will be deleted. Initial sync is skipped for this table, so replication resumes with new changes only. The pipeline will ${pipelineAction} automatically.` + return ({tableName}
-
- This will restart replication for{' '}
- {tableName} from scratch:
-