jobprofiler: WriteChunkedFileToJobInfo can write corrupt files on rewrite with the same filename #113232
Labels
A-disaster-recovery
A-jobs
branch-release-23.2
Used to mark GA and release blockers, technical advisories, and bugs for 23.2
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
release-blocker
Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked.
T-jobs
WriteChunkedFileToJobInfo
takes in a byte slice and a filename, chunks it up into 1mb chunks and then "writes" it to the job_info table. A write to the job_info table however is a delete of a previous row with the same info_key and a new row with the new bytes for that key. If a caller callsWriteChunkedFileToJobInfo
> 1 and the chunking of the file changes because of a change in size of the byte slice then we may end up in a situation where some chunks correspond to the old file and some to the new. We should either add a unique ts to the chunk names, but this then means an overwrite doesn't get rid of the previous version. Alternatively, we should teach the chunk method to delete all previous rows with the same filename before attempting to write new chunks.Jira issue: CRDB-32821
The text was updated successfully, but these errors were encountered: