Taming Post Claps
A race condition allowed manipulation of clap counts, prompting a fix using DynamoDB condition expressions and consistent reads.
MAIN POINTS
- A race condition bug allowed users to manipulate clap counts on Medium posts.
- The fix involved using DynamoDB conditional writes and strongly consistent reads.
- The bug did not affect earnings but caused UI discrepancies and was fixed with a backfill script.
TAKEAWAYS
- The bug was identified through a detailed user report and fixed to prevent future manipulation.
- Medium's Partner Program rewards are based on unique clappers, not total clap counts.
- Historical clap counts were corrected, ensuring data integrity without affecting partner earnings.