Skip to content

[Messenger] fix oracle sequence insert #54176

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

Closed

Conversation

stefan-kamsker
Copy link

@stefan-kamsker stefan-kamsker commented Mar 6, 2024

Q A
Branch? 6.4
Bug fix? yes
New feature? no
Deprecations? no
Issues Fix
License MIT

we have a issue with oracle platform when updating to doctrine-messenger 6.x

PHP 8.1
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0
PHP OCI 3.2.1 extension for PHP 8.1
Oracle Instaclient Driver 19.22
MESSENGER_TRANSPORT_DSN=doctrine://default?table_name=messenger_messages&auto_setup=false

the sequence fetch was not done anymore for messenger_messages table like in previous versions

INSERT INTO messenger_messages (BODY...) VALUES('body' ..)

this PR tries to fetch the sequence again

SELECT messenger_messages_seq.nextval FROM DUAL
INSERT INTO messenger_messages (ID,BODY...) VALUES(1,'body' ..)

we tried to fix send method with this PR, maybe there is a more elegant way to do this or any advice

thank you

@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has a contribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (see https://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (see https://symfony.com/releases)
  • Features and deprecations must be submitted against the 7.1 branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@stefan-kamsker stefan-kamsker changed the title [Messenger] fix oracale sequence insert [Messenger] fix oracle sequence insert Mar 6, 2024
Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you spot the PR that introduced the regression for you?
It's better when we don't have platform-specific code paths so it'd be nice to be 100% sure we do need this special check.

@@ -127,32 +127,52 @@ public static function buildConfiguration(#[\SensitiveParameter] string $dsn, ar
*/
public function send(string $body, array $headers, int $delay = 0): string
{

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to be removed

$now = new \DateTimeImmutable('UTC');
$availableAt = $now->modify(sprintf('%+d seconds', $delay / 1000));
$availableAt = $now->modify(sprintf('+%d seconds', $delay / 1000));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you change this line?
it was updated quite recently, see #53187

@fabpot
Copy link
Member

fabpot commented Aug 19, 2024

@stefan-kamsker Do you have time to have a look at the comments?

@fabpot
Copy link
Member

fabpot commented Jan 4, 2025

Closing as there is no more activities. Feel free to reopen when you have time to address the comments.

@fabpot fabpot closed this Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants