CDR export jobs such as ama exporter or cdr-exporter must never execute
on both active/passive node. because the output folder resides on a
glusterfs filesystem, this will cause merged or duplicate files, and
calls charged twice to customers subsequentially.
for .ama, the 2-phase commit steps for exporting CDRs were separated
already:
(a) rename .tmp file to final output file name
(b) commit db transaction:
- cdrexportstatus of all cdrs of that file
- file sequence number increment
The implemented 2PC flow will prevent (a) properly, if (b) fails.
This is now leveraged (by escalating the UPSERT not changing anything) to
abandon a whole file, if a single CDR shows an exportstatus other than
"unexported". Such CDRs indicate there is a race condition with another
exporter (which was quicker here).
the same thechnique also has to be added to cdr-exporter, which
unfortunately has no 2PC flow impl yet.
Change-Id: Ice40fa79d2b263018ee7825e314d63c9abe888ce
(cherry picked from commit e0d143ec3b)
mr8.5.2
parent
ddd55680ad
commit
c1f4672c12
Loading…
Reference in new issue