Open ddh opened 7 years ago
same issues from my side with octopus 0.9.1 and AR 4.2.8
Any word on how to fix this? I'm still having this problem Octopus 0.9.1 and A R 4.2.6
I have the same problem. Octopus 0.9.2 and AR 4.0.0
@thiagopradi We're still seeing this as well.
Octopus 0.9.2 | Rails 5.1.5
@thiagopradi We are hitting this as well; still have a fair amount of reads going to master due to this.
Octopus master (0.9.2) @ https://github.com/thiagopradi/octopus/commit/ba65ba647b7420b482043ead4fe1e729059a14de AR 4.2.8
Any news about this? am getting the same error.
I'm having issues retrieving associations of records that come from my slave shard. Not sure what is going on here and hopefully I can get some help debugging the issue! Might be related to #377
Given:
has_one
/belongs_to
relationship (User
has oneAddress
)master
), assume that it's always behind the slave shardslave
/shardProblem:
User.last
User.last.address
returns nil, although the associated record is in the replica.User.using(:replica).last.address
returns the record, but that defeats the purpose of abstracting knowing where to get the association fromI also noticed if I call on the association (in either direction, user.address or address.user), the associated record is returned only if it was in the master db (ie my local db) to begin with. It doesn't use the slave to make the query. Anyone else having this issue?