Subversion Repositories SmartDukaan

Rev

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

Filtering Options

Rev Age Author Path Log message Diff
36998 1 d 4 h ranu /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/ rbm calling target issue fix according to aquil  
36997 1 d 5 h ranu /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/ rbm calling target issue fix according to aquil  
36996 1 d 6 h ranu /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/ rbm calling target issue fix according to aquil  
36994 1 d 7 h ranu /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/ rbm calling target issue fix according to aquil  
36883 13 d 6 h ranu /trunk/ calling target given  
36596 45 d 5 h ranu /trunk/ row dump of target  
36359 72 d 2 h ranu /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/ rbm rating dashboard view commited  
36334 73 d 2 h ranu /trunk/ rbm rating dashboard view commited  
36333 73 d 2 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/ Fix IllegalStateException: drop 'unless' when using @Cacheable(sync=true)

Spring Cache rejects @Cacheable with both sync=true AND an 'unless' attribute,
throwing IllegalStateException on every invocation. Surfaced in production log
on smartdukaan — MonitorController.todayPORBM:739 was returning 500 on 40
observed calls this session.

Dropped 'unless'. Caching an occasionally-empty List for 5 min is harmless:
months with no sales produce an empty result, which is cheaper to re-query
after 5 min than to keep special-casing. The real fix driver for sync=true
(stampede protection) is preserved.
 
36329 73 d 4 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/ Tune rbmWeeklyBilling cache: 2m→5m TTL + sync=true

The RBM weekly billing aggregate query takes ~2s per call (1,924 cumulative hits
on hadb1 = 3,800s DB time). Previously cached for only 2 minutes with no
stampede protection — every 2m window, every concurrent dashboard load ran the
aggregate in parallel and burnt Hikari slots simultaneously.

- 2m → 5m: this is month-level aggregate bucketed by week, doesn't need
sub-minute freshness for an RBM dashboard.
- sync=true: single in-JVM computation per (monthStart, monthEnd) key per
expiry window; concurrent misses wait for the in-flight load instead of
racing to the DB.

fiveMintimeoutCacheManager already exists in CacheConfig:73 (Caffeine, in-memory,
so no Redis/LocalDateTime serialization concerns).
 
36296 77 d 5 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Add 2-min cache on dashboard-family queries

Three queries dominate dashboard DB time (~830 s / 30 min combined) because
they re-execute on every dashboard refresh with near-identical parameters:

- OrderRepositoryImpl.selectPartnersBilledBetweenDates: dynamic endDate is
LocalDateTime.now(), so cache key bucketed to 2-minute boundaries via SpEL
(endDate.toEpochSecond / 120) so calls in the same bucket share an entry.
- UserWalletRepositoryImpl.getPartnerWiseCollectionAchievement and
RbmTargetServiceImpl.getWeeklyBillingDataForMonth: default Spring key
(fofoIds + startDate) is stable, no bucketing needed.

All three use the existing Caffeine 'twoMintimeoutCacheManager' (in-memory,
per-JVM, expireAfterWrite=2min). unless clause skips caching empty results
so legitimately-empty responses don't pin a bad entry.
 
36284 78 d 1 h ranu /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ code optimization of today po rbm page  
36276 79 d 4 h ranu /trunk/ unique call and recording will show on dashboard  
36234 84 d 8 h ranu /trunk/ back date data ..........dashboard display on calling  
36229 86 d 1 h ranu /trunk/ rbm l1,l2,l3 layer introduce  
36228 86 d 2 h ranu /trunk/ rbm l1,l2,l3 layer introduce  
36225 86 d 2 h ranu /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/ rbm l1,l2,l3 layer introduce  
36212 87 d 1 h ranu /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ rbm l1,l2,l3 layer introduce  
36210 87 d 2 h ranu /trunk/ rbm l1,l2,l3 layer introduce  
36181 91 d 2 h ranu /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ weekly rating system live on calling module  

Show All