Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Can DatabaseQueue::getLockForPopping() use anything other than PDO::ATTR_DRIVER_NAME. #40426

Closed
leenooks opened this issue Jan 15, 2022 · 1 comment

Comments

@leenooks
Copy link

  • Laravel Version: 8.79.0
  • PHP Version: 8.0.13
  • Database Driver & Version: CockroachDB (pdo_pgsql)

Description:

I'm using CockroachDB with Laravel - which uses the PostgreSQL PDO driver. However, according to cockroachdb/cockroach#40476 it does not support SKIP LOCKED (yet anyway).

I've been enhancing nbj/cockroachdb-laravel (my fork is leenooks/cockroachdb-laravel), and what I cannot figure out is an easy way to ensure that DatabaseQueue::getLockForPopping() passess through the DB checks and returns true. Unfortunately that routine is using PDO::ATTR_DRIVER_NAME to determine what the DB is, but in this case it's not actually PostgreSQL.

Ideally, this routine should use something else PDO/Driver/... to determine the driver for the database and make its decision to include SKIP LOCKED based on the PHP driver, not the PDO driver.

Without this being changed, it doesnt seem that I can run job queues with CockroachDB.

@driesvints
Copy link
Member

Heya, thanks for submitting this.

This seems like a feature request or an improvement so I'm converting this to a discussion instead. It's best to post these in the discussions section in the future to get support for your idea. After that you may send a PR to the framework. Please only use the laravel/framework issue tracker to report bugs and issues with the framework.

Thanks!

@laravel laravel locked and limited conversation to collaborators Jan 15, 2022
@driesvints driesvints converted this issue into discussion #40431 Jan 15, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants