Home > Back-end >  Memcache execution problems
Memcache execution problems

Time:01-12

The state of the data to initialize a entitty status=0

Dubbo service seach
Query cache memcache to have the data, if there is a direct return, if no query from DB, into the cache and returns the result,

Dubbo service update
Update the DB data, and then delete the cached data

Dubbo service serviceA
The first step to call the search query for entitty
The pace with the update to update entitty field status=1

Dubbo service serviceB
The first step to invoke the search query for entitty, judge status is equal to 1 is for the next operation

The main program

Service call dubbo serviceA operation
Service call dubbo serviceB operation and execution to judge the status when the state still 0

Question 1: according to the definition of the main program is sequential, call only after serviceA serviceB, in serviceB should be 1 to the status of the theory, but in fact is 0. In serviceB call query is obtained serviceA update cache before the old data, single don't know why, how to solve this problem,
  • Related