Rev 35394 |
Rev 35536 |
Go to most recent revision |
Compare with Previous |
Directory listing |
Details |
Blame |
View Log
| RSS feed
Last modification
- Rev 35460 – 209 d 20 h
- Author: amit
- Log message:
- Fix LockAcquisitionException: Add bulk partner type fetch with MAX(base, current_sales) logic
Problem:
- N+1 queries calling getTypeOnDate caused concurrent persist operations
- This led to LockAcquisitionException during high concurrency
Solution:
- Add getTypesForFofoIds() bulk read method for N+1 scenarios
- Add getBaseTypesForFofoIds() to fetch base types (first record of month)
- Implement MAX(base, current_sales) logic:
- Partner can upgrade mid-month based on current sales
- Partner can downgrade from upgrade but NOT below base
- Base type = previous month's sales tier
- Reduce cache from 1 day to 30 minutes for faster upgrade propagation