Skip to content
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

release-23.2: jobs: fix bug in WriteChunkedFileToJobInfo during overwriting #113290

Merged
merged 1 commit into from Oct 30, 2023

Commits on Oct 27, 2023

  1. jobs: fix bug in WriteChunkedFileToJobInfo during overwriting

    Previously, `WriteChunkedFileToJobInfo` would chunk up the
    passed in byte slice and write the chunks to the job_info table
    with info keys constructed using the filename. If the method
    were to be invoked again with the same filename, due to the
    delete before write semantics of the job info table, if the
    number of chunks changed then we'd end up with a corrupt
    file. With chunks from the first and second write mixed.
    
    This change fixes the bug by first deleting all the chunks that
    correspond to the filename before writing the new data. This
    is in line with how you'd expect an overwrite operation to
    work. This change also adds a regression test for the same.
    
    Fixes: #113232
    Release note (bug fix): fixes a bug in a method that was used
    by some of the jobs observability infrastructure, that could be
    triggered if a file was overwrriten with a different chunking
    strategy
    adityamaru committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    f52410d View commit details
    Browse the repository at this point in the history