(root)/ – Rev 38005
Rev 38004 |
Rev 38006 |
Go to most recent revision |
Last modification |
Compare with Previous |
View Log
| RSS feed
Last modification
- Rev 38005 2026-11-04 19:25:46
- Author: amit
- Log message:
- fix(credit-note): commit monthly margin CN run per partner; drop one-time CN/DN remediation
issueMonthlyMarginsCN ran as one transaction for the whole month (2026-11-04: 51 min, 1,441 docs,
a NIC IRN call per doc inside it). The cn_sequence/fofo_dn_sequence bump X-locked every
sellerwarehouse row it touched until commit, so billing's getInvoiceNumber (SELECT ... FOR UPDATE
on the same row) hit innodb_lock_wait_timeout.
- issueMonthlyMarginsCN is now a NOT_SUPPORTED orchestrator: loadMarginRunInput (REQUIRES_NEW
readOnly) -> issueMarginsCNForPartner per fofo (REQUIRES_NEW) -> queueMarginRunReports
(REQUIRES_NEW). Per-partner body unchanged; the partner mail stays in the partner txn.
- sellerwarehouse is read with new SellerWarehouseRepository.selectByPrefixForUpdate (the lock
billing takes) and prefixes are processed in sorted order.
- Removed one-time remediation tools, no live callers: issueCorrectiveMarginCNs (never ran live),
generateDebitNotesForCancelled x2 + processSingleCancelledCnTx (last ran 2026-05-09),
cancelMarginDnIrns + cancelSingleMarginDn, regenerateMarginIrns; repo
selectCancelledByMonth / selectByCreditNoteNumbers.