-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
builtins: change complete_stream builtin to take a timestamp #60543
Conversation
744901a
to
ae32109
Compare
docs/generated/sql/functions.md
Outdated
@@ -2274,7 +2274,7 @@ The swap_ordinate_string parameter is a 2-character string naming the ordinates | |||
<table> | |||
<thead><tr><th>Function → Returns</th><th>Description</th></tr></thead> | |||
<tbody> | |||
<tr><td><a name="crdb_internal.complete_stream_ingestion_job"></a><code>crdb_internal.complete_stream_ingestion_job(job_id: <a href="int.html">int</a>) → <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>This function can be used to signal a running stream ingestion job to complete. The job will eventually stop ingesting, revert to the latest resolved timestamp and leave the cluster in a consistent state. This function does not wait for the job to reach a terminal state, but instead returns the job id as soon as it has signaled the job to complete. This builtin can be used in conjunction with SHOW JOBS WHEN COMPLETE to ensure that the job has left the cluster in a consistent state.</p> | |||
<tr><td><a name="crdb_internal.complete_stream_ingestion_job"></a><code>crdb_internal.complete_stream_ingestion_job(job_id: <a href="int.html">int</a>, cutover_ts: <a href="timestamp.html">timestamptz</a>) → <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>This function can be used to signal a running stream ingestion job to complete. The job will eventually stop ingesting, revert to the latest resolved timestamp and leave the cluster in a consistent state. This function does not wait for the job to reach a terminal state, but instead returns the job id as soon as it has signaled the job to complete. This builtin can be used in conjunction with SHOW JOBS WHEN COMPLETE to ensure that the job has left the cluster in a consistent state.</p> |
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.
Let's update the description here. It will cut over to the specified timestamp rather than the "latest resolved timestamp".
It may also be worth calling out that the cutover timestamp can "only" (that should be enough?) be specified up to the millisecond.
ae32109
to
44eaebb
Compare
This change adds a ts parameter to crdb_internal.complete_stream_ingestion_job builtin. This ts will be the ts as of which the cluster being ingested into will be considered in a consistent state. Release note: None
44eaebb
to
8494822
Compare
TFTR! bors r=pbardea,miretskiy |
Build succeeded: |
This change adds a ts parameter to
crdb_internal.complete_stream_ingestion_job builtin. This ts will be the
ts as of which the cluster being ingested into will be considered in a
consistent state.
Release note: None