codejump

Consistency & Data Architecture

Preview — 3 of 10 questions

Two POST requests both check that an external ID is absent, then both insert it. What closes this race?

AA database unique constraint plus conflict handling
BA Pydantic string validator alone
CA response model with exclude_none
DLogging both request IDs

A client retries POST /payments after a timeout, but the first request may have committed. What protects against double creation?

AA shorter FastAPI route name
BAn idempotency key enforced with a unique database record
CReturning 201 before committing
DDeleting the first request's logs

Two requests read the same balance and each write a derived new value. What failure can occur without concurrency control?

AAutomatic serial execution by FastAPI
BAn OpenAPI validation error
CA lost update
DAn extra response header

Sign up free to play

Answer all 10 questions (7 more), see explanations for every answer, and track your score.