Remove unnecessary db call when replacing. #14234

Merged
merged 1 commit into from Mar 1, 2014

Projects

None yet

5 participants

@arthurnn
Member

When replacing a has_many association with the same one, there is no
need to do a round-trip to the db to create/and drop a new transaction.

[fixes #14220]

review @carlosantoniodasilva

(let me know if I should add a CHANGELOG)

@arthurnn arthurnn Remove unnecessary db call when replacing.
When replacing a has_many association with the same one, there is no
need to do a round-trip to the db to create/and drop a new transaction.

[fixes #14220]
774160b
@robin850 robin850 added this to the 4.0.4 milestone Mar 1, 2014
@spastorino spastorino merged commit f60b524 into rails:master Mar 1, 2014

1 check passed

default The Travis CI build passed
Details
@carlosantoniodasilva

@arthurnn thanks!
@spastorino do we backport to 4-1?

@arthurnn arthurnn deleted the arthurnn:fix_trans_on_replace branch Mar 1, 2014
@spastorino
Member

@carlosantoniodasilva I wouldn't backport performance optimizations (unless something really gross happened) to stable branches, only bug fixes, but ...

@arthurnn
Member
arthurnn commented Mar 2, 2014

👍 with @spastorino . No actual need to impact 4-1 release with this if this add some regression.

@robin850 robin850 modified the milestone: 4.2.0, 4.0.4 Mar 2, 2014
@korun
korun commented Mar 3, 2014

Many thanks!
@arthurnn, so, this bug fix can be seen only in 4.2.0 version?

@arthurnn
Member
arthurnn commented Mar 3, 2014

thats correct, this is in master only and will be release in the next
master release which is probably 4.2.0

On Monday, March 3, 2014, Ivan notifications@github.com wrote:

Many thanks!
@arthurnn https://github.com/arthurnn, so, this bug fix can be seen
only in 4.2.0 version?

Reply to this email directly or view it on GitHubhttps://github.com/rails/rails/pull/14234#issuecomment-36483234
.

Arthur Nogueira Neves
Follow me @arthurnn http://www.twitter.com/arthurnn89

@korun
korun commented Mar 3, 2014

This is sadly... 😞

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