solid_queue icon indicating copy to clipboard operation
solid_queue copied to clipboard

Support MS SQL server

Open erlingur opened this issue 2 years ago • 2 comments

Would it be possible to make this gem compatible with MS SQL server using the READPAST hint and UPDLOCK?

https://www.reddit.com/r/SQL/comments/17thq2b/for_update_skip_locked_equivalent_for_ms_sql/ https://learn.microsoft.com/en-us/sql/t-sql/queries/hints-transact-sql-table?view=sql-server-ver16

erlingur avatar Dec 19 '23 10:12 erlingur

Hey @erlingur, great suggestion. I'll add this one to the list of improvements/enhancements we want to ship in the short term. It might take a bit because I don't have experience with MS SQL server. If you'd like to take a stab at it, please feel free. I'd like to detect the RDMS and version when starting, and decide what to use (no SKIP LOCKED at all, SKIP LOCKED...) so maybe this would be done at the same time 🤔

rosa avatar Dec 19 '23 15:12 rosa

I put together a small spike as I'm also very interested in this. Unfortunately, there's a few issues besides the READPAST hint that would need to be resolved (see details in comment):

https://github.com/jonahgeorge/solid_queue/pull/1

jonahgeorge avatar Dec 24 '23 20:12 jonahgeorge