Page MenuHomePhabricator

Donation import should merge and delete pending db info
Closed, ResolvedPublic2 Estimated Story Points

Description

Once the donation is in CiviCRM, we're better off deleting the pending database entry.

Event Timeline

awight created this task.Jul 27 2016, 8:00 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 27 2016, 8:00 PM
DStrine set the point value for this task to 2.Jul 29 2016, 8:29 PM

Change 305679 had a related patch set uploaded (by Ejegg):
Always look for and delete pending entries

https://gerrit.wikimedia.org/r/305679

Change 305679 abandoned by Ejegg:
Always look for and delete pending entries

https://gerrit.wikimedia.org/r/305679

Looks like the PaymentsInitial consumer is correctly deleting from pending, but the pending consumer seems to never find already complete or failed payments_initial rows. Also, the log message has a random ID and should show the actual message ID.

Change 312550 had a related patch set uploaded (by Ejegg):
Fix all db accessors sharing a single instance

https://gerrit.wikimedia.org/r/312550

Ejegg added a comment.Sep 23 2016, 7:52 PM

Found a late static binding bug that might explain it (though i'd have expected exceptions). Also, this is another race condition. If payments-init is consumed before a sparse donation message is imported, we'll lose donor information. Let's just consult payments_initial for failed, and maybe contribution_tracking for completed, just to see if there's a contribution id already set.

Change 312563 had a related patch set uploaded (by Ejegg):
WIP use ct_id to find completed, avoid race

https://gerrit.wikimedia.org/r/312563

Change 312550 merged by jenkins-bot:
Fix all db accessors sharing a single instance

https://gerrit.wikimedia.org/r/312550

Ejegg closed this task as Resolved.Oct 12 2016, 10:31 PM
mmodell removed a subscriber: awight.Jun 22 2017, 9:34 PM