Prevent unnecessary sticking to the DB primary
Experiments can be run on high-traffic read-only pages and when a transaction is initiated, our load balancing code will direct all queries to the primary. This update is a no-op most of the time so we skip the update when we detect that the attributes haven't changed. ActiveRecord actually already does this under the hood but a `#transaction` call is still made in the process causing the undesired behavior with our load balancer.
Showing
Please register or sign in to comment