Netflix's fact store runs three kinds of data checks:
counts compared with past trends
canary checks on a small, fixed sample of members, picked by a hash of the member id
random queries over recent and old data.
Netflix reported that since deploying these checks, it has identified more than 95% of data issues early.
In the editor, write mismatch_rate(logged, recomputed) and alert(rate). logged maps request ids to the value serving logged, and recomputed maps them to the value the offline path computes: one id differs and one is missing.
Pick an answer above to see the rest
Instructions
1
Write mismatch_rate(logged, recomputed, tol=1e-6): the share of request ids in logged whose recomputed value is missing or differs by more than tol.
2
Write alert(rate, threshold=0.001): True when the rate is above the threshold.