forked from mtusi2026/mtusi2026lab3
40 lines
2.0 KiB
Plaintext
40 lines
2.0 KiB
Plaintext
### Before fixes (commit fbb8916)
|
|
== 1. Idempotent replay after membership removal
|
|
PASS: first POST with key -> 201 (got 201)
|
|
PASS: history after removal -> 404 (got 404)
|
|
FAIL: replay with same key and body after removal -> 404 (got 201)
|
|
== 2. Live but not ready api-1 (no route to PostgreSQL)
|
|
FAIL: nginx active check marks api-1 down in upstream
|
|
PASS: Docker marks api-1 unhealthy
|
|
FAIL: 40 GET /users/me with warm session: served by not-ready api-1 = 20
|
|
PASS: 40 GET /users/me: 200 responses = 40
|
|
PASS: 20 POST messages during outage -> all 201 (got [201])
|
|
== 3. LB does not transparently retry non-idempotent POST /chats
|
|
PASS: chats in DB (11) == 201 responses (11), POST /chats codes=[201, 201, 201, 201, 201, 201, 201, 201, 201, 201]
|
|
FAIL: nginx access log: 12 POST /chats, sent to two upstreams: 3
|
|
FAIL: non_idempotent only on messages route: {'/': True}
|
|
PASS: api-1 healthy again after PostgreSQL route restored
|
|
PASS: api-1 returns to LB rotation
|
|
PASS: nginx upstream has no servers marked down
|
|
RESULT: FAIL (5)
|
|
|
|
### After fixes
|
|
== 1. Idempotent replay after membership removal
|
|
PASS: first POST with key -> 201 (got 201)
|
|
PASS: history after removal -> 404 (got 404)
|
|
PASS: replay with same key and body after removal -> 404 (got 404)
|
|
== 2. Live but not ready api-1 (no route to PostgreSQL)
|
|
PASS: nginx active check marks api-1 down in upstream
|
|
PASS: Docker marks api-1 unhealthy
|
|
PASS: 40 GET /users/me with warm session: served by not-ready api-1 = 0
|
|
PASS: 40 GET /users/me: 200 responses = 40
|
|
PASS: 20 POST messages during outage -> all 201 (got [201])
|
|
== 3. LB does not transparently retry non-idempotent POST /chats
|
|
PASS: chats in DB (9) == 201 responses (9), POST /chats codes=[503, 201, 503, 201, 201, 201, 201, 201, 201, 201]
|
|
PASS: nginx access log: 12 POST /chats, sent to two upstreams: 0
|
|
PASS: non_idempotent only on messages route: {'~ ^/api/v1/chats/[^/]+/messages$': True, '/': False}
|
|
PASS: api-1 healthy again after PostgreSQL route restored
|
|
PASS: api-1 returns to LB rotation
|
|
PASS: nginx upstream has no servers marked down
|
|
RESULT: PASS
|