Skip to content

Conversation

@tgxworld
Copy link
Contributor

@rails-bot
Copy link

r? @kamipo

(@rails-bot has picked a reviewer for you, use r? to override)

@tgxworld
Copy link
Contributor Author

r? @matthewd

@rails-bot rails-bot assigned matthewd and unassigned kamipo Aug 22, 2018
Copy link
Member

Choose a reason for hiding this comment

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

This is a continuation of the preceding discussion of prepared_statements.

More generally, the above feels a bit heavy-weight for what should be relatively obscure configuration, to me. How about we combine the two: "By default Active Record uses database features like prepared statements and advisory locks. You might need to disable those features if you're using an external connection pooler like PgBouncer: [yaml]"?

Copy link
Member

Choose a reason for hiding this comment

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

I know it's a departure from @prepared_statements, but I suspect this would be clearer as @advisory_locks_enabled, particularly for the callers below.

Copy link
Member

Choose a reason for hiding this comment

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

Just returning @advisory_locks[_enabled] seems clear enough here

Copy link
Member

Choose a reason for hiding this comment

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

Typo, and example goes above your name.

@tgxworld tgxworld force-pushed the add_config_to_disable_advisory_locks branch from 62b0da1 to 20bb397 Compare August 22, 2018 14:07
@tgxworld
Copy link
Contributor Author

tgxworld commented Aug 22, 2018

@matthewd Thank you for reviewing, I've updated the PR as per your comments.

@matthewd matthewd merged commit 24f6bf0 into rails:master Aug 22, 2018
@matthewd
Copy link
Member

🤘🏻❤️

:logger,
:prepared_statements,
:lock,
:advisory_locks
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be :advisory_locks_enabled?

Copy link
Member

Choose a reason for hiding this comment

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

I think it is matching prepared_statements. I'm fine with either one.

Copy link
Contributor

Choose a reason for hiding this comment

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

The instance variable is named @advisory_locks_enabled.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@georgeclaghorn Oops good catch. Thank you for fixing @kamipo 👍

@tgxworld tgxworld deleted the add_config_to_disable_advisory_locks branch August 22, 2018 23:57
@faucct
Copy link
Contributor

faucct commented Aug 30, 2018

Could this get a version bump (5.2.2 or 5.2.1.1)? Rails repository is very huge to fetch.

@rafaelfranca
Copy link
Member

This is only going to be present in Rails 6.0. And no, we only release when we think it is ready, we can't release after every merged PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants