# 2026-02-05

## Morning
- Fixed N+1 query issue in order-service's `get_orders_with_items` endpoint
  - Root cause: SQLAlchemy lazy loading on `Order.items` relationship
  - Solution: switched to `selectinload(Order.items)` — query count dropped from 152 to 3
  - PR #347 merged after Alice's review

- Discussed caching strategy with Alice
  - Decision: two-tier caching — Redis L1 (TTL 5min) + local LRU L2 (TTL 30s)
  - Redis handles cross-instance cache, LRU avoids network round-trip for hot keys
  - Will implement in `CacheMiddleware` class

## Afternoon
- Deployed v2.3.1 to staging environment
  - All integration tests passed
  - Performance regression test showed 12% improvement on order listing API

- Discovered intermittent webhook timeout in payment module
  - Stripe webhooks occasionally take >30s to respond
  - Temporary fix: increased timeout to 60s
  - TODO: implement async webhook processing with Kafka consumer

## Evening
- Code review for Charlie's Terraform PR (#352) — Kubernetes node autoscaling config
  - Suggested using Karpenter instead of Cluster Autoscaler for faster scale-up
  - Charlie will investigate and update the PR
