Subversion Repositories SmartDukaan

Rev

Hide changed files | Details | Compare with Previous | Blame | RSS feed

Filtering Options

Rev Age Author Path Log message Diff Changes
37907 11 d 10 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ fix(offers): stop stale offer rows being re-cached after an offer change

Readers whose transaction began before an offer write committed could cache
the old row (e.g. offer 10851 shown inactive on Offer History for 6h).
- OfferCacheGate: offer caches refuse fills from readers whose transaction
began before the last offer change (atomic Lua check-and-set)
- TxStartTrackingTransactionManager records each transaction's start time
- offer cache evictions run after the transaction completes, marking the change first
- activate/publishAll evict inside their REQUIRES_NEW transaction
- evictAllOfferCaches(YearMonth) for Refresh Cache; offer cache TTL 6h -> 1h
 
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/config/OfferCacheGate.java
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/config/TxStartTrackingTransactionManager.java
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/config/CacheConfig.java
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/offers/OfferService.java
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/offers/OfferServiceImpl.java