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

remove deprecated advisory lock uniqueness, consolidate insert logic #614

Merged
merged 1 commit into from
Oct 4, 2024

Commits on Oct 4, 2024

  1. remove deprecated advisory lock uniqueness, consolidate insert logic

    This removes the original unique jobs implementation in its entirety. It
    was already deprecated in the previous release.
    
    All known use cases are better supported with the new unique jobs
    implementation which is also dramatically faster and supports batch
    insertion.
    
    As part of this change, single insertions now inherit the behavior of
    batch insertions as far as always setting a `scheduled_at` time in the
    job args prior to hitting the database. This is due to the difficulty of
    trying to pass an array of nullable timestamps for `scheduled_at` to the
    database using sqlc. One side effect of this is that some tests needed
    to be updated because they run in a transaction, which locks in a
    particular `now()` time used in `JobGetAvailble` by default. Jobs
    inserted _after_ the start of that transaction would pick up a scheduled
    timestamp from Go code that is _later_ than the database transaction's
    timestamp, and so those jobs would never run. This was fixed in some
    cases by allowing `now` to be overridden by lower level callers of that
    query, whereas other tests were updated to simply insert jobs with a
    past `scheduled_at` to ensure their visibility.
    bgentry committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    182dfb4 View commit details
    Browse the repository at this point in the history