frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: How do you handle duplicate side effects when jobs, workflows retry?

3•shineDaPoker•1h ago
Quick context: I'm building background job automation and keep hitting this pattern:

1. Job calls external API (Stripe, SendGrid, AWS) 2. API call succeeds 3. Job crashes before recording success 4. Job retries → calls API again → duplicate

Example: process refund, send email notification, crash. Retry does both again. Customer gets duplicate refund email (or worse, duplicate refund).

I see a few approaches:

Option A: Store processed IDs in database Problem: Race between "check DB" and "call API" can still duplicate

Option B: Use API idempotency keys (Stripe supports this) Problem: Not all APIs support it (legacy systems, third-party)

Option C: Build deduplication layer that checks external system first Problem: Extra latency, extra complexity

What do you do in production? Accept some duplicates? Only use APIs with idempotency? Something else?

(I built something for Option C, but trying to understand if this is actually a common-enough problem or if I'm over-engineering.)

Comments

moomoo11•45m ago
You proxy those api calls yourself and have idempotency to cover you for those APIs that don’t have it. If you architect it right you won’t have more than a ms latency addition. You can avoid the race condition issues by using atomic records so if something else tries they’d see it’s in progress and exit.

Energym: Move the World

https://www.aicandy.be/giorgio-1
1•zdw•1m ago•0 comments

Tonka beans are illegal in the US

https://www.bbc.com/future/article/20170620-the-delicious-flavour-with-a-toxic-secret
1•valzevul•2m ago•0 comments

OpenClaw Hype: Analysis of Chatter from the Dark Web (BleepingComputer)

https://www.bleepingcomputer.com/news/security/the-openclaw-hype-analysis-of-chatter-from-open-so...
1•ildar•5m ago•0 comments

Any Website Can Take Full Control of Your OpenClaw Agent (Oasis)

https://www.oasis.security/blog/openclaw-vulnerability
1•ildar•7m ago•0 comments

Show HN: Cecil – open-source memory and identity protocol for AI

https://github.com/johnkf5-ops/cecil-protocol
1•JohnKnopf•10m ago•1 comments

New AirSnitch attack breaks Wi-Fi encryption in homes, offices, and enterprises

https://arstechnica.com/security/2026/02/new-airsnitch-attack-breaks-wi-fi-encryption-in-homes-of...
1•brie22•11m ago•0 comments

Show HN: HeadshotAI – Professional AI headshots in 30 seconds for £4.99

https://headshotai-mvp-jb.netlify.app
1•jackbventures•19m ago•1 comments

China piles pressure on Japan after Takaichi Sanae's triumph

https://www.economist.com/asia/2026/02/26/china-piles-pressure-on-japan-after-takaichi-sanaes-tri...
2•petethomas•24m ago•0 comments

The Cron King

http://thecronking.com/
1•thebuilderjr•29m ago•0 comments

Can LLMs reason about math? The Subtraction Trick Test

https://haversine.substack.com/p/can-llms-reason-about-math-the-subtraction
3•MakeAJiraTicket•30m ago•0 comments

Show HN: Toggl lock‑screen widget for real‑time time tracking

https://apps.apple.com/ca/app/toggl-lockscreen-widget/id6756894639
1•dakoder36•35m ago•0 comments

How Anthropic Teams use Claude Code [pdf]

https://www-cdn.anthropic.com/58284b19e702b49db9302d5b6f135ad8871e7658.pdf
2•carlsborg•35m ago•0 comments

User Interview #3

https://twitter.com/AviSchiffmann/status/2026798365489725742
1•d_silin•36m ago•0 comments

Show HN: CodeLeash: framework for quality agent development, NOT an orchestrator

https://codeleash.dev/
2•cadamsdotcom•37m ago•0 comments

Principia Mathematica, Vol. 1

https://www.gutenberg.org/cache/epub/78050/pg78050-images.html
2•petethomas•37m ago•0 comments

Show HN: VeryBot – Self-hosted AI assistant for work

https://github.com/charlie0077/verybot
1•verybot•38m ago•0 comments

The Hunt for Dark Breakfast – Can we derive breakfasts we have never observed?

https://moultano.wordpress.com/2026/02/22/the-hunt-for-dark-breakfast/
38•moultano•41m ago•13 comments

Hong Kong jailed my dad to stop me speaking out, says activist

https://www.bbc.com/news/articles/cly897pv4j9o
2•tartoran•42m ago•0 comments

Parakeet.cpp – Parakeet ASR inference in pure C++ with Metal GPU acceleration

https://github.com/Frikallo/parakeet.cpp
7•noahkay13•43m ago•1 comments

Preserving the Web Is Not the Problem. Losing It Is

https://www.techdirt.com/2026/02/17/preserving-the-web-is-not-the-problem-losing-it-is/
3•the-mitr•48m ago•0 comments

Frankensqlite a Rust reimplementation of SQLite with concurrent writers

https://frankensqlite.com/
1•rahimnathwani•48m ago•0 comments

Show HN: Selling my painting to fund a Steam Cleaning startup in Libya

https://juicebox.money/v5/base:139
1•Ali_ll•48m ago•1 comments

Flexport Atlas: Browse the world's container shipping network

https://atlas.flexport.com
1•thedogeye•50m ago•0 comments

How Predator iPhone Spyware Can Defeat iOS Orange and Green Recording Indicators

https://www.jamf.com/blog/predator-spyware-ios-recording-indicator-bypass-analysis/
3•transpute•51m ago•0 comments

A Nationwide Book Ban Bill Has Been Introduced in the House of Representatives

https://bookriot.com/hr7661-book-ban-legislation/
24•LostMyLogin•57m ago•1 comments

The Compact Disc Story – Kees Immink

https://www.researchgate.net/publication/294484774_Compact_disc_story
2•pipeline_peak•58m ago•0 comments

The Web Weaver's Magical Loom

https://sidwashere.substack.com/p/the-web-weavers-magical-loom
1•SidsCreativTech•58m ago•0 comments

GitHub code view fails to load when content contains non-ASCII characters

https://www.githubstatus.com/incidents/kv1lzpgzr9yp
1•csmantle•1h ago•1 comments

Brain on "Not X but Y"

https://hollisrobbinsanecdotal.substack.com/p/metannoying
1•HR01•1h ago•0 comments

Exploring the Gleam FFI (2024)

https://www.jonashietala.se/blog/2024/01/11/exploring_the_gleam_ffi/
1•notagoodidea•1h ago•0 comments