You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/01/18 08:35:30 UTC

[GitHub] [shardingsphere] tuyendev edited a comment on issue #14858: read-write-splitting with spring boot and jpa never read on read-datasource

tuyendev edited a comment on issue #14858:
URL: https://github.com/apache/shardingsphere/issues/14858#issuecomment-1015180971


   @zjcnb I don't think your configuration is wrong.
   I found a weird behaviour ( not sure about that  ) in **ReadwriteSplittingDataSourceRouter.java**
   
   `    private boolean isPrimaryRoute(final SQLStatement sqlStatement) {
           return containsLockSegment(sqlStatement) || !(sqlStatement instanceof SelectStatement) || HintManager.isWriteRouteOnly() || TransactionHolder.isTransaction();
       }`
   
   The **TransactionHolder.isTransaction()** was **true**, i even don't set any transaction configuration.  
   It worked in previous version (4.1.1). I only cause problem with this version (5.0.0)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org