You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi everyone! We are considering Apache ShardingSphere for our read/write splitting use case. The tech stack is Java17/SpringBoot3 and we are trying JDBC mode. The default behaviour is like all select statements go to a read-only slave and other statements go to the master.
The requirement is when I have a transaction, specified by @Transactional annotation, all the statements (select, insert ..) should go to the master. On the other hand, when there is no transaction or there is @Transactional(readOnly=true) we expect the select statements to go to the read-only slave instance.
We expected the mentioned behaviour by setting transactionalReadQueryStrategy to PRIMARY, but by setting this all the statements go to the master.
Is there any option to cover this requirement?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi everyone! We are considering Apache ShardingSphere for our read/write splitting use case. The tech stack is Java17/SpringBoot3 and we are trying JDBC mode. The default behaviour is like all select statements go to a read-only slave and other statements go to the master.
The requirement is when I have a transaction, specified by
@Transactional
annotation, all the statements (select, insert ..) should go to the master. On the other hand, when there is no transaction or there is@Transactional(readOnly=true)
we expect the select statements to go to the read-only slave instance.We expected the mentioned behaviour by setting
transactionalReadQueryStrategy
toPRIMARY
, but by setting this all the statements go to the master.Is there any option to cover this requirement?
Beta Was this translation helpful? Give feedback.
All reactions