lyf200581105 opened a new issue, #19503:
URL: https://github.com/apache/shardingsphere/issues/19503

   Using shardingsphere-jdbc-core 5.1.2 + spring jpa, only sharding tables, 
using LOCAL Transaction only.
   DB: AWS Aurora
   Both read and write operations are using the master endpoint
   
   Using Jmeter to do some performance test
   step 1: call create API to insert data to DB and return id
   step 2: call get API with ID returned by step1 to query the data by Id, 
about 70% of results showed data not found(please refer to attached log)
   
![image](https://user-images.githubusercontent.com/49605984/180646918-56598000-47bb-4ee8-b811-2a2f93cfafe5.png)
   
   
   But if pause about 30ms between step1 and step2,  or or add 
**@Transactional** with getting method(like below ), then all queries of step2 
return successfully 
      @Transactional
       @Override
       public TestModel getById(Long id) {
           Optional<TestModel> optional = repository.findById(id);
           if(!optional.isPresent()) {
               throw new RuntimeException("TestModel [" + id + "] not found");
           }
           return optional.get();
       }
   
   I saw there is a statement for LOCAL Transaction as below
   "There is no loss in performance, but strong consistency and final 
consistency cannot be guaranteed."
   
   Is this behavior correct? Need to open a transaction for query operation?
   
   


-- 
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: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to