Skip to content

Releases: vapor-community/vapor-queues-fluent-driver

Fix race condition between set() and push()

24 Oct 09:59
20ebbf1
Compare
Choose a tag to compare

A worker can end up picking up a job between set() and push(), causing a race condition that results in the job running twice. This update fixes the race by adding an initial state for jobs that haven't yet been pushed.

There is no test included because I couldn't work out a clean way to reliably test for the race.

Fixes #13.

Thanks to @sterien7 for reporting, and to @sidepelican for the excellent analysis of the problem in the original report against the old version of the driver!

Implement preservable jobs and configurable jobs table name

01 Oct 12:49
4e31dfa
Compare
Choose a tag to compare

Preserved jobs, if enabled, are marked with a completed state in the database. Turning preservation off if it was previously on does not clear old jobs from the table; it just prevents new ones from being preserved.

Configuring the jobs table name requires passing the same name (and optionally, space) to both the queue driver and the migration. This is necessary because there's no way for the migration to see the driver's configuration.

3.0.0-beta.3.1 - Fix timestamp columns in MySQL 5.7

26 Jun 20:38
bc47078
Compare
Choose a tag to compare

No other changes in this release.

3.0.0-beta.3 - AsyncQueue and lots more tests

14 Jun 18:18
0ecd6fa
Compare
Choose a tag to compare

Detailed changes:

  • The queue driver now adopts the new AsyncQueue protocol and no longer has to go back and forth between futures.
  • Adopters of this package are no longer forced to have all three of the Fluent SQL database driver stacks (SQLite, Postgres, MySQL) in their dependencies (although most modern versions of SwiftPM manage to avoid this problem already); the tests instead will only use whichever drivers were included at the time of the tests being built (defaults to none, except in CI).
  • The StoredJobState.completed enum case has been removed, since we never actually used it. This incidentally improves the behavior of the DELETE query in the queue's clear() method.
  • The tests are now more comprehensive.
  • More Sendable warnings fixed.
  • Made the database queries (even) more readable.

3.0.0-beta.2.4 - Miscellaneous cleanup

19 May 18:34
c369658
Compare
Choose a tag to compare
Pre-release
  • Bump the versions of our dependencies
  • Clean up the docs
  • Update the tests for the Concurrency-related changes in Vapor

3.0.0-beta.2.3 - Fix MySQL and PostgreSQL for real (I think)

06 May 19:47
cad57b4
Compare
Choose a tag to compare

See #4. We now handle enums and the blob column correctly across the board and actually test all three drivers (though only locally, not yet in CI).

3.0.0-beta.2.2 - Support MySQL 5.7

02 May 09:12
5b76c5f
Compare
Choose a tag to compare
Pre-release

MySQL before 8.0 (why is anyone still using 5.7? 😭) didn't support SKIP LOCKED.

3.0.0-beta.2.1 - Fix enums

28 Apr 20:02
199bd0e
Compare
Choose a tag to compare
Pre-release

We were mishandling enums in all three database types.

3.0.0-beta.2 - Overhaul package for present-day Fluent and Vapor

28 Apr 18:30
3720aa6
Compare
Choose a tag to compare

This is a fork and complete overhaul of the entire package, updating it for the current versions of Vapor and Fluent and improving performance and behavior.

Changes in public API in this version:

  • JobMetadataMigration is no longer configurable.
  • QueuesFluentDbType has been removed.

All databases supported by Fluent remain supported by this version.