Tweak ECM Doublecheck
|Reported by:||Mic||Owned by:|
At this moment ECM doublecheck does not cope well when doublecheck fails. For example if loadbalancer selects 2 readers, and their answers differ, we need 2 more correct answers (4 readers) - that easily makes timeouts. We could do some improvements:
- If we get same CW for a second time, we can assume it is correct (example: 1st reader sends CW1, 2nd sends CW2, 3rd sends CW2 - we know CW1 is invalid and CW2 is OK).
- Change priority of logging - push log only when check failed, in other case put debug log
- Print which reader provided correct CW (we could find out which reader sends bad CW)
These are included in attached patch. Explanation:
- we cut cw_checked in half to allow storing both CWs. But to not extend cw_checked, we decided to store only 5,6,7,8,9,10,11,12 bytes of CW, it is more than sufficient.
- we don't decrease checked value - as we know both responses, we will manage to compare third response
- Copy behaviour from CWCycle check (as in cwcycle_allowbadfromffb) to doublecheck - and Mark CWs from Fallback Reader as always correct
- Consider marking failed reader in stats
How the issue is reproducable
when ECM doublecheck is enabled