sql: EXPORT should (probably?) have job entries
A few things things:
- IMPORT has a job entry, so for symmetry EXPORT should probably too. That would simplify the usability story wrt cancellation too.
- EXPORT can really last a long time. Would be nice to have that pop up in the job UI.
- I saw a few crashes of our reg cluster that seem (According to logs) to be associated with EXPORTs. Unfortunately they don't appear in the event log / job table so I could not troubleshoot.
- if a long export is en-route and the node crashes it would be nice that it restarts. A job would achieve that.
(issue filed on behalf of @nstewart )
Jira issue: CRDB-4919
Have we done any more thinking on this one? Trying to export from a CRDB system of record into a data warehouse and the lack of a job record is a pain
Specific issue that's come up -- in many cases, I get errors like:
pq: unexpected closure of consumer or even just packet_write_wait: Connection to 18.207.54.42 port 22: Broken pipe and I see files in s3, however, I do not know if the EXPORT was successful or not.
This is a very reasonable ask. I don't think there is a ton of engineering design to be done on this - we just need to make sure that a real job record is created, and that the EXPORT operation records its status and respects pause, resume, and cancel operations. I think we can prioritize this for 20.1.
See also https://github.com/cockroachdb/cockroach/pull/70057
Export is not a job. To give export job entries, it should be refactored into a job.
@ajwerner yep, I’m just doing a bit of linking of GH issues related to the same use case. @miretskiy’s work offers promise in this direction but atm we not too optimistic we can achieve EXPORT semantics (read: no duplicates) with that one.
We have marked this issue as stale because it has been inactive for 18 months. If this issue is still relevant, removing the stale label or adding a comment will keep it active. Otherwise, we'll close it in 10 days to keep the issue queue tidy. Thank you for your contribution to CockroachDB!
Closing this issue; if export ever becomes a job it will (very likely) be done by using cdc export underneath.