Storefront has been decoupled into micro-frontends with a dedicated commerce app and shared shell.

Read the architecture guide →

Order creation conflict or failure

Safely investigate failed or repeated Order creation requests and Redis coordination issues.

Runbook

Trigger / Symptom & Blast Radius

POST /api/v1/orders returns 409 Conflict, times out with an ambiguous outcome, fails during concurrent buyer checkouts, or encounters Order Cache and Distributed LocksContainerv1.0.0Order Cache and Distributed LocksRedis-backed coordination and caching slice owned by the Ordering bounded context for buyer-scoped creation locks, HTTP ...Ownercommerce-fulfillment-teamDiagramOpen docs connectivity errors. Blast radius is active checkout submissions; committed orders in Order DatabaseContainerv1.0.0Order DatabaseAuthoritative PostgreSQL system of record owned by the Ordering bounded context for buyers, accepted orders, purchase-ti...Ownercommerce-fulfillment-teamDiagramOpen docs remain safe.

Danger

Never flush Order Cache and Distributed LocksContainerv1.0.0Order Cache and Distributed LocksRedis-backed coordination and caching slice owned by the Ordering bounded context for buyer-scoped creation locks, HTTP ...Ownercommerce-fulfillment-teamDiagramOpen docs or bulk-delete idempotency or lock keys during an incident. Clearing Redis removes active duplicate-request markers and buyer write locks, risking duplicate orders across concurrent checkouts.

Pre-Flight Check

Before retrying any checkout, query Order APIServicev1.0.0Order APIAuthenticated Ordering service for Buyer profiles and the Order lifecycle, creating Orders from baskets, snapshotting pr...PublishesGetBasketGrpc, GetBookGrpc +5SubscribesCreateOrder, CompleteOrder +11APIsOpenAPI, AsyncAPI, Carrier Service LevelsOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs to verify whether the order was already persisted in Order DatabaseContainerv1.0.0Order DatabaseAuthoritative PostgreSQL system of record owned by the Ordering bounded context for buyers, accepted orders, purchase-ti...Ownercommerce-fulfillment-teamDiagramOpen docs, and check Redis responsiveness:

Terminal window
curl -sS -H "Authorization: Bearer <ADMIN_TOKEN>" "https://<GATEWAY_HOST>/ordering/api/v1/orders?buyerId=<BUYER_ID>&pageIndex=1&pageSize=10"
redis-cli -u "<REDIS_URL>" PING

Quick Recovery Procedure

  1. Capture privacy-safe correlation context

    Record <BUYER_ID>, x-request-id, UTC timestamp, <ENV>, and HTTP status code. Exclude street addresses, emails, and other PII from incident tickets.

  2. Classify the conflict or error in Ordering logs

    Stream Order APIServicev1.0.0Order APIAuthenticated Ordering service for Buyer profiles and the Order lifecycle, creating Orders from baskets, snapshotting pr...PublishesGetBasketGrpc, GetBookGrpc +5SubscribesCreateOrder, CompleteOrder +11APIsOpenAPI, AsyncAPI, Carrier Service LevelsOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs logs filtered by <REQUEST_ID> and <BUYER_ID>:

    Terminal window
    az containerapp logs show --name <SERVICE_NAME> --resource-group <RESOURCE_GROUP> --tail 150

    409 Conflict: A 1-hour idempotency marker already exists for <REQUEST_ID>. If the order exists in Step 1, return its orderId; if no order exists, verify whether the original request is still in flight before retrying.

    Concurrent write lock error: Another checkout for <BUYER_ID> holds the 1-minute buyer write lock. Wait for it to finish and re-query GET /api/v1/orders.

    400 Bad Request: Client omitted the required x-request-id header.

    429 Too Many Requests: Per-user rate limit exceeded; honor Retry-After.

  3. Restore Redis connectivity if unavailable

    If logs show Redis timeouts, restore Azure Managed Redis connectivity without flushing keys, then re-verify Order DatabaseContainerv1.0.0Order DatabaseAuthoritative PostgreSQL system of record owned by the Ordering bounded context for buyers, accepted orders, purchase-ti...Ownercommerce-fulfillment-teamDiagramOpen docs before advising the customer to retry.

Verification

Confirm Order APIServicev1.0.0Order APIAuthenticated Ordering service for Buyer profiles and the Order lifecycle, creating Orders from baskets, snapshotting pr...PublishesGetBasketGrpc, GetBookGrpc +5SubscribesCreateOrder, CompleteOrder +11APIsOpenAPI, AsyncAPI, Carrier Service LevelsOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs responds with HTTP 200 and only a single order exists for the checkout attempt:

Terminal window
curl -sS -o /dev/null -w "%{http_code}\n" -H "Authorization: Bearer <ADMIN_TOKEN>" "https://<GATEWAY_HOST>/ordering/api/v1/orders?buyerId=<BUYER_ID>&pageIndex=1&pageSize=1"

Expected output:

200

Rollback / Escalation

  • Rollback: Do not manually delete persisted orders; use standard administrative cancellation (PATCH /api/v1/orders/{id}/cancel) if a duplicate order was created externally.
  • Escalation: Escalate persistent Redis outages to Platform Engineering TeamTeamPlatform Engineering TeamPlatform team providing BookWorm's thinnest viable platform—orchestration, messaging fabric, scheduling, notifications, ...Open docs; escalate idempotency or lock bugs to Commerce Fulfillment TeamTeamCommerce Fulfillment TeamStream-Aligned team owning customer shopping baskets, checkout coordination, order lifecycle, and financial saga orchest...Open docs.