Closed benbelow closed 1 year ago
Adding this ticket to backlog as it would also prevent search failure caused by a matching donor that has been removed from the donor store since the search began, as was the cause of #1030
ExternalDonorCode
EthnicityCode
RegistryCode
DonorType
, into a new model: MatchingDonorInfo
MatchingAlgorithmResult.DonorType
as obsolete (do not delete as it is a breaking change)IDonorReader
from activity functions, their dependencies, and from service configuration.
- If a match result donor cannot be found in the donor store, then code should not throw an exception but simply remove that donor from the result set before it is written
@IgorKupreychik I just found this in the support README. It makes a good point that if a "donor not found" exception is thrown during matching, then retry logic will automatically re-run the search by which time the donor deletion update should have reached the matching db. That's probably why we have not observed this issue in matching all this time.
On that basis, I suggest we don't remove the donor from the result set, as that would mask syncing issues between donor store and matching db.
I do think we should catch and log a clear trace message (and then rethrow) so it is easy to understand what went wrong
Run a search that is known to return donors, with match prediction ON
ExternalDonorCode
should be populated for every donor object in the resultsisDonorUnrepresented
should be false
)Open the matching results file for the search request in the container matching-algorithm-results
DonorType
should still be populatedMatchingDonorInfo
, should be present and populated@zabeen Testing status: Ok
The matching algorithm already needs to query the donor store to fetch e.g. external donor code and registry info.
Match prediction algorithm also queries the donor store for registry + ethnicity info - but if this was included in the matching results, we could remove the MPA -> Donor SQL queries, and save some time.