lab5: исправления по ревью
Concurrent complete no longer deletes the shared verified source; admission is atomic and covers pending presign rows; relay reconciles queued jobs lost to dead-lettering; failed staging is protected until failed_retention; timestamps normalized to UTC; reprocess prefers the durable original and keeps job->attachment lock order; heartbeat errors no longer burn attempts; confirm timeout enforced; pinned images and sanitized health responses.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# lab5_async 2026-10-30T19:29:41Z
|
||||
worker down: 202 queued, content 409, queued attachment linked
|
||||
# lab5_async 2026-10-30T20:08:22Z
|
||||
worker down: 202 queued, content 409, queued attachment linked, API restarted
|
||||
worker restarted: ready, thumbnail and original downloadable, staging cleared
|
||||
broker down: upload accepted into outbox
|
||||
broker + relay recovered: queued job reached ready
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# attachments negative 2026-10-30T19:32:35Z
|
||||
# attachments negative 2026-10-30T20:11:40Z
|
||||
env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 student-tests/attachments_negative.py --base-url "http://localhost:8080"
|
||||
10 MiB + 1 body: 413
|
||||
empty body: 415
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
# db state 2026-10-30T19:34:38Z
|
||||
# db state 2026-10-30T20:13:30Z
|
||||
status | count
|
||||
---------+-------
|
||||
failed | 8
|
||||
failed | 2
|
||||
pending | 4
|
||||
ready | 74
|
||||
ready | 25
|
||||
(3 rows)
|
||||
|
||||
status | count
|
||||
--------+-------
|
||||
failed | 8
|
||||
ready | 81
|
||||
failed | 2
|
||||
ready | 28
|
||||
(2 rows)
|
||||
|
||||
variants
|
||||
----------
|
||||
243
|
||||
84
|
||||
(1 row)
|
||||
|
||||
unpublished | outbox
|
||||
-------------+--------
|
||||
0 | 150
|
||||
0 | 52
|
||||
(1 row)
|
||||
|
||||
Timeout: 60.0 seconds ...
|
||||
Listing queues for vhost messenger ...
|
||||
name messages messages_ready messages_unacknowledged consumers
|
||||
attachment.process.dead 12 12 0 0
|
||||
attachment.process.dead 4 4 0 0
|
||||
attachment.process.v1 0 0 0 1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# failover 2026-10-30T19:32:39Z
|
||||
# failover 2026-10-30T20:11:43Z
|
||||
env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "http://localhost:8080"
|
||||
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
||||
{"observed_instances_before": 2, "successful_writes": 98, "failed_attempts": 0, "first_recovery_seconds": 2.34}
|
||||
{"observed_instances_before": 2, "successful_writes": 99, "failed_attempts": 0, "first_recovery_seconds": 0.221}
|
||||
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# fault injection 2026-10-30T19:30:35Z
|
||||
# fault injection 2026-10-30T20:09:37Z
|
||||
permanent failure: failed/injected_failure, content 409, failed attachment not linkable, registry visible
|
||||
replay: failed -> queued -> ready, one thumbnail
|
||||
replay ready job: refused
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# idempotency 2026-10-30T19:32:39Z
|
||||
# idempotency 2026-10-30T20:11:43Z
|
||||
env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 student-tests/idempotency_parallel.py --base-url "http://localhost:8080"
|
||||
{"replay": {"workers": 12, "instances": ["5012b453c822", "63bc0da849d5"], "message_id": "01a18e4c-cb55-7c5f-a0e3-f3285329e15b"}, "conflict": {"workers": 12, "accepted": 1, "conflicts": 11}, "stable_body": {"message_id": "01a18e4c-cb87-70be-889e-b4b781fc7d0f"}, "key_required": {"status": 400}}
|
||||
{"replay": {"workers": 12, "instances": ["1c67613c89f2", "ee96975adb44"], "message_id": "01a18e70-8fcd-7519-91ab-d9c43b6a5f37"}, "conflict": {"workers": 12, "accepted": 1, "conflicts": 11}, "stable_body": {"message_id": "01a18e70-8ff9-759f-ab87-abd58f58c59d"}, "key_required": {"status": 400}}
|
||||
PASS: параллельный повтор с одним Idempotency-Key создаёт ровно одно сообщение
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
ok mtusi-messenger/internal/storage/postgres 8.124s
|
||||
ok mtusi-messenger/internal/storage/redis 1.122s
|
||||
ok mtusi-messenger/internal/storage/postgres 8.934s
|
||||
ok mtusi-messenger/internal/storage/redis 1.229s
|
||||
|
||||
@@ -1,34 +1,34 @@
|
||||
# lb readiness 2026-10-30T19:33:46Z
|
||||
# lb readiness 2026-10-30T20:10:40Z
|
||||
scripts/lb_readiness_check.sh
|
||||
# LB excludes a not-ready but reachable replica (lab5)
|
||||
# generated: 2026-10-30T19:33:46Z
|
||||
# lb: haproxy:3.2-alpine
|
||||
# generated: 2026-10-30T20:10:40Z
|
||||
# lb: haproxy:3.2-alpine@sha256:254e6370f01cd654e0744edf607c67f33777c1b6a9dc0d4b28bcba7171460122
|
||||
|
||||
## 1. baseline: requests through LB by replica
|
||||
23 5012b453c822
|
||||
17 63bc0da849d5
|
||||
stats: api1=UP 1/2 api2=UP api3=MAINT (resolution) api4=MAINT (resolution) api5=MAINT (resolution) api6=MAINT (resolution) api7=MAINT (resolution) api8=MAINT (resolution) BACKEND=UP
|
||||
19 1c67613c89f2
|
||||
21 ee96975adb44
|
||||
stats: api1=UP api2=MAINT (resolution) api3=UP api4=MAINT (resolution) api5=MAINT (resolution) api6=MAINT (resolution) api7=MAINT (resolution) api8=MAINT (resolution) BACKEND=UP
|
||||
|
||||
## 2. start a temporary TCP proxy to postgres and a candidate replica behind the same network alias
|
||||
instance-id: 4da30d29f490, readiness while its database is reachable: 200
|
||||
load balancer slot for the candidate: api1, stats: api1=UP api2=UP api3=UP api4=MAINT (resolution) api5=MAINT (resolution) api6=MAINT (resolution) api7=MAINT (resolution) api8=MAINT (resolution) BACKEND=UP
|
||||
instance-id: 6dff747ee488, readiness while its database is reachable: 200
|
||||
load balancer slot for the candidate: api2, stats: api1=UP api2=UP 1/2 api3=UP api4=MAINT (resolution) api5=MAINT (resolution) api6=MAINT (resolution) api7=MAINT (resolution) api8=MAINT (resolution) BACKEND=UP
|
||||
|
||||
## 3. cut the candidate's database access (stop only the TCP proxy)
|
||||
candidate is still running: running, readiness: 503
|
||||
waiting for the load balancer to mark api1 DOWN
|
||||
WARNING: api1 is still not DOWN
|
||||
stats after failure: api1=UP api2=UP api3=DOWN api4=MAINT (resolution) api5=MAINT (resolution) api6=MAINT (resolution) api7=MAINT (resolution) api8=MAINT (resolution) BACKEND=UP
|
||||
waiting for the load balancer to mark api2 DOWN
|
||||
api2 went DOWN 0s after its database was cut (check: inter 2s fall 2)
|
||||
stats after failure: api1=UP api2=DOWN api3=UP api4=MAINT (resolution) api5=MAINT (resolution) api6=MAINT (resolution) api7=MAINT (resolution) api8=MAINT (resolution) BACKEND=UP
|
||||
|
||||
## 4. 40 requests through LB while the candidate is not ready
|
||||
18 5012b453c822
|
||||
22 63bc0da849d5
|
||||
23 1c67613c89f2
|
||||
17 ee96975adb44
|
||||
(the candidate must not appear above)
|
||||
|
||||
## 5. business writes through LB during the exclusion
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 810.163,
|
||||
"successful_rps": 746.262,
|
||||
|
||||
## 6. cleanup
|
||||
stats after cleanup: api1=UP api2=UP api3=MAINT (resolution) api4=MAINT (resolution) api5=MAINT (resolution) api6=MAINT (resolution) api7=MAINT (resolution) api8=MAINT (resolution) BACKEND=UP
|
||||
stats after cleanup: api1=UP api2=MAINT (resolution) api3=UP api4=MAINT (resolution) api5=MAINT (resolution) api6=MAINT (resolution) api7=MAINT (resolution) api8=MAINT (resolution) BACKEND=UP
|
||||
lb_readiness_check.sh: evidence in evidence/lb-readiness.txt
|
||||
|
||||
+11
-11
@@ -3,18 +3,18 @@ level=info msg="golangci-lint has version 2.13.2 built with go1.27.1 from (unkno
|
||||
level=info msg="[config_reader] Config search paths: [./ /Users/vladislav/Projects/mtusi2026lab5 /Users/vladislav/Projects /Users/vladislav /Users /]"
|
||||
level=info msg="[config_reader] Used config file .golangci.yml"
|
||||
level=info msg="[config_reader] Module name \"mtusi-messenger\""
|
||||
level=info msg="[goenv] Read go env for 5.612667ms: map[string]string{\"GOCACHE\":\"/Users/vladislav/Library/Caches/go-build\", \"GOROOT\":\"/opt/homebrew/Cellar/go/1.27.1/libexec\"}"
|
||||
level=info msg="[goenv] Read go env for 5.643458ms: map[string]string{\"GOCACHE\":\"/Users/vladislav/Library/Caches/go-build\", \"GOROOT\":\"/opt/homebrew/Cellar/go/1.27.1/libexec\"}"
|
||||
level=info msg="[lintersdb] Active 50 linters: [asasalint bodyclose canonicalheader containedctx contextcheck copyloopvar depguard durationcheck errcheck errname errorlint exhaustive exptostd fatcontext forbidigo forcetypeassert gocheckcompilerdirectives gocritic gofumpt goimports gomoddirectives gosec govet ineffassign intrange makezero misspell musttag nilerr nilnil noctx nolintlint perfsprint prealloc reassign recvcheck revive rowserrcheck sloglint sqlclosecheck staticcheck testifylint thelper tparallel unconvert unparam unused usestdlibvars usetesting wastedassign]"
|
||||
level=info msg="[loader] Using build tags: [integration]"
|
||||
level=info msg="[loader] Go packages loading at mode 8767 (compiled_files|deps|exports_file|imports|name|types_sizes|files) took 241.235292ms"
|
||||
level=info msg="[runner/filename_unadjuster] Pre-built 0 adjustments in 11.528667ms"
|
||||
level=info msg="[linters_context/goanalysis] analyzers took 2.426723836s with top 10 stages: revive: 891.424584ms, goimports: 197.31775ms, gosec: 134.79375ms, wastedassign: 101.139582ms, ctrlflow: 56.356778ms, gocritic: 43.448751ms, unparam: 40.089709ms, sloglint: 32.727792ms, ineffassign: 32.149583ms, directives: 31.348126ms"
|
||||
level=info msg="[runner/exclusion_rules] Skipped 7 issues by rules: [Path: \"_test\\\\.go\", Linters: \"gosec, prealloc, forcetypeassert, unparam\"]"
|
||||
level=info msg="[runner] Issues before processing: 889, after processing: 0"
|
||||
level=info msg="[runner] Processors filtering stat (in/out): path_absoluter: 889/889, nolint_filter: 6/0, filename_unadjuster: 889/889, invalid_issue: 889/889, exclusion_rules: 302/6, cgo: 889/889, exclusion_paths: 889/889, generated_file_filter: 889/302, path_relativity: 889/889"
|
||||
level=info msg="[runner] processing took 3.421128ms with stages: generated_file_filter: 2.333667ms, nolint_filter: 532.749µs, path_relativity: 260.5µs, exclusion_rules: 259.916µs, invalid_issue: 12.625µs, cgo: 12.125µs, path_absoluter: 5.042µs, filename_unadjuster: 2.626µs, sort_results: 500ns, max_same_issues: 250ns, exclusion_paths: 209ns, fixer: 167ns, path_prettifier: 167ns, path_shortener: 126ns, source_code: 125ns, max_per_file_from_linter: 125ns, diff: 84ns, max_from_linter: 42ns, severity-rules: 42ns, uniq_by_line: 41ns"
|
||||
level=info msg="[runner] linters took 1.269085s with stages: goanalysis_metalinter: 1.265620125s"
|
||||
level=info msg="[loader] Go packages loading at mode 8767 (files|imports|name|compiled_files|deps|exports_file|types_sizes) took 210.149917ms"
|
||||
level=info msg="[runner/filename_unadjuster] Pre-built 0 adjustments in 11.759541ms"
|
||||
level=info msg="[linters_context/goanalysis] analyzers took 0s with no stages"
|
||||
level=info msg="[runner/exclusion_rules] Skipped 8 issues by rules: [Path: \"_test\\\\.go\", Linters: \"gosec, prealloc, forcetypeassert, unparam\"]"
|
||||
level=info msg="[runner] Issues before processing: 881, after processing: 0"
|
||||
level=info msg="[runner] Processors filtering stat (in/out): exclusion_paths: 881/881, nolint_filter: 6/0, path_absoluter: 881/881, invalid_issue: 881/881, generated_file_filter: 881/292, cgo: 881/881, filename_unadjuster: 881/881, path_relativity: 881/881, exclusion_rules: 292/6"
|
||||
level=info msg="[runner] processing took 2.916079ms with stages: generated_file_filter: 1.448166ms, nolint_filter: 891.875µs, exclusion_rules: 277.041µs, path_relativity: 263.459µs, invalid_issue: 13.082µs, cgo: 11.375µs, path_absoluter: 4.792µs, filename_unadjuster: 2.875µs, max_same_issues: 958ns, sort_results: 750ns, exclusion_paths: 500ns, fixer: 458ns, path_shortener: 167ns, max_per_file_from_linter: 125ns, source_code: 125ns, path_prettifier: 125ns, diff: 83ns, max_from_linter: 41ns, severity-rules: 41ns, uniq_by_line: 41ns"
|
||||
level=info msg="[runner] linters took 627.484792ms with stages: goanalysis_metalinter: 624.525167ms"
|
||||
0 issues.
|
||||
level=info msg="File cache stats: 0 entries of total size 0B"
|
||||
level=info msg="Memory: 17 samples, avg is 140.2MB, max is 244.9MB"
|
||||
level=info msg="Execution took 1.52797275s"
|
||||
level=info msg="Memory: 10 samples, avg is 84.0MB, max is 111.1MB"
|
||||
level=info msg="Execution took 856.003459ms"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# persistence 2026-10-30T19:33:01Z
|
||||
# persistence 2026-10-30T20:12:05Z
|
||||
env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 tests/resilience.py --mode persistence --action-script "scripts/restart.sh" --base-url "http://localhost:8080"
|
||||
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
|
||||
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# presign 2026-10-30T19:32:37Z
|
||||
# presign 2026-10-30T20:11:41Z
|
||||
env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 student-tests/presign_flow.py --base-url "http://localhost:8080"
|
||||
happy path: direct PUT 200, complete queued, ready after worker
|
||||
message with attachment downloaded as the second chat member
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# make test 2026-10-30T19:29:39Z
|
||||
# make test 2026-10-30T20:08:03Z
|
||||
env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 tests/smoke.py --base-url "http://localhost:8080"
|
||||
PASS: lab5 public API scenario; infrastructure and grading evidence remain separate.
|
||||
|
||||
+12
-12
@@ -1,16 +1,16 @@
|
||||
# stand 2026-10-30T19:34:37Z
|
||||
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
|
||||
mtusi-messenger-lab5-api-1 mtusi-messenger:lab5 "/usr/local/bin/mess…" api 5 minutes ago Up 58 seconds (healthy) 8080/tcp
|
||||
mtusi-messenger-lab5-api-2 mtusi-messenger:lab5 "/usr/local/bin/mess…" api 5 minutes ago Up 58 seconds (healthy) 8080/tcp
|
||||
mtusi-messenger-lab5-broker-1 rabbitmq:4.3.7-management-alpine "docker-entrypoint.s…" broker 47 minutes ago Up About a minute (healthy) 4369/tcp, 5671-5672/tcp, 15671/tcp, 15691-15692/tcp, 25672/tcp, 127.0.0.1:15672->15672/tcp
|
||||
mtusi-messenger-lab5-lb-1 haproxy:3.2-alpine "docker-entrypoint.s…" lb 47 minutes ago Up 53 seconds 127.0.0.1:8404->8404/tcp, 127.0.0.1:8080->80/tcp
|
||||
mtusi-messenger-lab5-postgres-1 postgres:18-alpine@sha256:77f585114c32fbca283dc835b0596f4e52b51b4c6662d7810b2f4084f60a1873 "docker-entrypoint.s…" postgres 7 minutes ago Up About a minute (healthy) 5432/tcp
|
||||
mtusi-messenger-lab5-redis-1 redis:7.4-alpine "docker-entrypoint.s…" redis 47 minutes ago Up About a minute (healthy) 6379/tcp
|
||||
mtusi-messenger-lab5-relay-1 mtusi-messenger:lab5 "/usr/local/bin/relay" relay 2 minutes ago Up 58 seconds (healthy) 8080/tcp, 127.0.0.1:8082->8082/tcp
|
||||
mtusi-messenger-lab5-seaweedfs-1 chrislusf/seaweedfs:3.80@sha256:1055999e08eed1789b0ae45d235126e4495e23d3fb9d6396293fd42539b1ae6a "/entrypoint.sh serv…" seaweedfs 46 minutes ago Up About a minute (healthy) 7333/tcp, 8080/tcp, 8888/tcp, 9333/tcp, 18080/tcp, 18888/tcp, 19333/tcp, 127.0.0.1:8333->8333/tcp
|
||||
mtusi-messenger-lab5-worker-1 mtusi-messenger:lab5 "/usr/local/bin/work…" worker 2 minutes ago Up 58 seconds (healthy) 8080/tcp, 127.0.0.1:8081->8081/tcp
|
||||
# stand 2026-10-30T20:13:29Z
|
||||
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
|
||||
mtusi-messenger-lab5-api-1 mtusi-messenger:lab5 "/usr/local/bin/mess…" api 6 minutes ago Up 46 seconds (healthy) 8080/tcp
|
||||
mtusi-messenger-lab5-api-2 mtusi-messenger:lab5 "/usr/local/bin/mess…" api 6 minutes ago Up 46 seconds (healthy) 8080/tcp
|
||||
mtusi-messenger-lab5-broker-1 rabbitmq:4.3.7-management-alpine@sha256:1528a88eebf2bc4d0ab7e9d5d9bc542e9bdf5e1b105e65848fcf8de5c2186528 "docker-entrypoint.s…" broker 6 minutes ago Up About a minute (healthy) 4369/tcp, 5671-5672/tcp, 15671/tcp, 15691-15692/tcp, 25672/tcp, 127.0.0.1:15672->15672/tcp
|
||||
mtusi-messenger-lab5-lb-1 haproxy:3.2-alpine@sha256:254e6370f01cd654e0744edf607c67f33777c1b6a9dc0d4b28bcba7171460122 "docker-entrypoint.s…" lb 6 minutes ago Up 40 seconds 127.0.0.1:8404->8404/tcp, 127.0.0.1:8080->80/tcp
|
||||
mtusi-messenger-lab5-postgres-1 postgres:18-alpine@sha256:77f585114c32fbca283dc835b0596f4e52b51b4c6662d7810b2f4084f60a1873 "docker-entrypoint.s…" postgres 6 minutes ago Up About a minute (healthy) 5432/tcp
|
||||
mtusi-messenger-lab5-redis-1 redis:7.4-alpine@sha256:858f009f9709ce576febc734aa78b8f6d624b82571f9ddb6bda4377c833b3499 "docker-entrypoint.s…" redis 6 minutes ago Up About a minute (healthy) 6379/tcp
|
||||
mtusi-messenger-lab5-relay-1 mtusi-messenger:lab5 "/usr/local/bin/relay" relay About a minute ago Up 46 seconds (healthy) 8080/tcp, 127.0.0.1:8082->8082/tcp
|
||||
mtusi-messenger-lab5-seaweedfs-1 chrislusf/seaweedfs:3.80@sha256:1055999e08eed1789b0ae45d235126e4495e23d3fb9d6396293fd42539b1ae6a "/entrypoint.sh serv…" seaweedfs 6 minutes ago Up About a minute (healthy) 7333/tcp, 8080/tcp, 8888/tcp, 9333/tcp, 18080/tcp, 18888/tcp, 19333/tcp, 127.0.0.1:8333->8333/tcp
|
||||
mtusi-messenger-lab5-worker-1 mtusi-messenger:lab5 "/usr/local/bin/work…" worker About a minute ago Up 46 seconds (healthy) 8080/tcp, 127.0.0.1:8081->8081/tcp
|
||||
|
||||
mtusi-messenger:lab5 bc5f51c66c24
|
||||
mtusi-messenger:lab5 a637d8b7d2d2
|
||||
rabbitmq:4.3.7-management-alpine 1528a88eebf2
|
||||
haproxy:3.2-alpine 254e6370f01c
|
||||
redis:7.4-alpine 858f009f9709
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
scenario,rep,pass,detail
|
||||
duplicate_before_effect,1,1,attempts=1
|
||||
stale_version_after_v2,1,1,v1_job=01a18e4a-6bff-7166-a56b-3ee5bc7fad9f
|
||||
stale_version_after_v2,1,1,v1_job=01a18e6e-17b0-763b-b330-7adbcb43a700
|
||||
duplicate_before_effect,2,1,attempts=1
|
||||
stale_version_after_v2,2,1,v1_job=01a18e4a-9b1b-77ea-8d49-6d14e6b628fe
|
||||
stale_version_after_v2,2,1,v1_job=01a18e6e-455e-75f3-857a-750ed660378b
|
||||
duplicate_before_effect,3,1,attempts=1
|
||||
stale_version_after_v2,3,1,v1_job=01a18e4a-c897-7b9f-83f6-951a71696d39
|
||||
stale_version_after_v2,3,1,v1_job=01a18e6e-74f2-7b4a-842b-c014c626413c
|
||||
|
||||
|
+17
-17
@@ -6,35 +6,35 @@ env -u APP_ENV -u SERVER_HOST -u SERVER_PORT -u SERVER_READ_HEADER_TIMEOUT -u SE
|
||||
? mtusi-messenger/cmd/s3init [no test files]
|
||||
? mtusi-messenger/cmd/worker [no test files]
|
||||
? mtusi-messenger/internal/broker [no test files]
|
||||
ok mtusi-messenger/internal/config 1.470s
|
||||
ok mtusi-messenger/internal/domain 1.621s
|
||||
ok mtusi-messenger/internal/config 2.441s
|
||||
ok mtusi-messenger/internal/domain 1.484s
|
||||
? mtusi-messenger/internal/failpoint [no test files]
|
||||
ok mtusi-messenger/internal/health 2.890s
|
||||
ok mtusi-messenger/internal/imagecheck 2.373s
|
||||
ok mtusi-messenger/internal/imageproc 2.240s
|
||||
ok mtusi-messenger/internal/logger 3.288s
|
||||
ok mtusi-messenger/internal/health 2.069s
|
||||
ok mtusi-messenger/internal/imagecheck 1.809s
|
||||
ok mtusi-messenger/internal/imageproc 3.094s
|
||||
ok mtusi-messenger/internal/logger 2.975s
|
||||
? mtusi-messenger/internal/outbox [no test files]
|
||||
ok mtusi-messenger/internal/platform/cache 3.207s
|
||||
ok mtusi-messenger/internal/platform/cache 3.522s
|
||||
? mtusi-messenger/internal/platform/cache/mocks [no test files]
|
||||
ok mtusi-messenger/internal/platform/objectstore 3.773s
|
||||
ok mtusi-messenger/internal/platform/password 2.523s
|
||||
ok mtusi-messenger/internal/platform/token 2.532s
|
||||
ok mtusi-messenger/internal/service/attachment 2.729s
|
||||
ok mtusi-messenger/internal/platform/objectstore 5.364s
|
||||
ok mtusi-messenger/internal/platform/password 4.551s
|
||||
ok mtusi-messenger/internal/platform/token 4.459s
|
||||
ok mtusi-messenger/internal/service/attachment 5.686s
|
||||
? mtusi-messenger/internal/service/attachment/mocks [no test files]
|
||||
ok mtusi-messenger/internal/service/chat 2.019s
|
||||
ok mtusi-messenger/internal/service/chat 3.610s
|
||||
? mtusi-messenger/internal/service/chat/mocks [no test files]
|
||||
ok mtusi-messenger/internal/service/message 3.609s
|
||||
ok mtusi-messenger/internal/service/message 3.931s
|
||||
? mtusi-messenger/internal/service/message/mocks [no test files]
|
||||
ok mtusi-messenger/internal/service/session 4.238s
|
||||
ok mtusi-messenger/internal/service/session 5.387s
|
||||
? mtusi-messenger/internal/service/session/mocks [no test files]
|
||||
ok mtusi-messenger/internal/service/user 1.365s
|
||||
ok mtusi-messenger/internal/service/user 4.965s
|
||||
? mtusi-messenger/internal/service/user/mocks [no test files]
|
||||
ok mtusi-messenger/internal/storage/postgres 4.021s
|
||||
ok mtusi-messenger/internal/storage/postgres 5.965s
|
||||
? mtusi-messenger/internal/storage/postgres/internal/sqlcgen [no test files]
|
||||
? mtusi-messenger/internal/storage/postgres/migrations [no test files]
|
||||
? mtusi-messenger/internal/storage/redis [no test files]
|
||||
? mtusi-messenger/internal/storage/redis/mocks [no test files]
|
||||
ok mtusi-messenger/internal/transport/rest 4.311s
|
||||
ok mtusi-messenger/internal/transport/rest 6.275s
|
||||
? mtusi-messenger/internal/transport/rest/internal/oas [no test files]
|
||||
? mtusi-messenger/internal/transport/rest/mocks [no test files]
|
||||
? mtusi-messenger/internal/worker [no test files]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# lab5_variants 2026-10-30T19:29:54Z
|
||||
# lab5_variants 2026-10-30T20:08:36Z
|
||||
variants: thumbnail 256x160, crop 128x128, optimized WebP 320x200; metadata == bytes
|
||||
PASS: lab5 variant contract
|
||||
|
||||
+14
-14
@@ -1,31 +1,31 @@
|
||||
# LB excludes a not-ready but reachable replica (lab5)
|
||||
# generated: 2026-10-30T19:33:46Z
|
||||
# lb: haproxy:3.2-alpine
|
||||
# generated: 2026-10-30T20:10:40Z
|
||||
# lb: haproxy:3.2-alpine@sha256:254e6370f01cd654e0744edf607c67f33777c1b6a9dc0d4b28bcba7171460122
|
||||
|
||||
## 1. baseline: requests through LB by replica
|
||||
23 5012b453c822
|
||||
17 63bc0da849d5
|
||||
stats: api1=UP 1/2 api2=UP api3=MAINT (resolution) api4=MAINT (resolution) api5=MAINT (resolution) api6=MAINT (resolution) api7=MAINT (resolution) api8=MAINT (resolution) BACKEND=UP
|
||||
19 1c67613c89f2
|
||||
21 ee96975adb44
|
||||
stats: api1=UP api2=MAINT (resolution) api3=UP api4=MAINT (resolution) api5=MAINT (resolution) api6=MAINT (resolution) api7=MAINT (resolution) api8=MAINT (resolution) BACKEND=UP
|
||||
|
||||
## 2. start a temporary TCP proxy to postgres and a candidate replica behind the same network alias
|
||||
instance-id: 4da30d29f490, readiness while its database is reachable: 200
|
||||
load balancer slot for the candidate: api1, stats: api1=UP api2=UP api3=UP api4=MAINT (resolution) api5=MAINT (resolution) api6=MAINT (resolution) api7=MAINT (resolution) api8=MAINT (resolution) BACKEND=UP
|
||||
instance-id: 6dff747ee488, readiness while its database is reachable: 200
|
||||
load balancer slot for the candidate: api2, stats: api1=UP api2=UP 1/2 api3=UP api4=MAINT (resolution) api5=MAINT (resolution) api6=MAINT (resolution) api7=MAINT (resolution) api8=MAINT (resolution) BACKEND=UP
|
||||
|
||||
## 3. cut the candidate's database access (stop only the TCP proxy)
|
||||
candidate is still running: running, readiness: 503
|
||||
waiting for the load balancer to mark api1 DOWN
|
||||
WARNING: api1 is still not DOWN
|
||||
stats after failure: api1=UP api2=UP api3=DOWN api4=MAINT (resolution) api5=MAINT (resolution) api6=MAINT (resolution) api7=MAINT (resolution) api8=MAINT (resolution) BACKEND=UP
|
||||
waiting for the load balancer to mark api2 DOWN
|
||||
api2 went DOWN 0s after its database was cut (check: inter 2s fall 2)
|
||||
stats after failure: api1=UP api2=DOWN api3=UP api4=MAINT (resolution) api5=MAINT (resolution) api6=MAINT (resolution) api7=MAINT (resolution) api8=MAINT (resolution) BACKEND=UP
|
||||
|
||||
## 4. 40 requests through LB while the candidate is not ready
|
||||
18 5012b453c822
|
||||
22 63bc0da849d5
|
||||
23 1c67613c89f2
|
||||
17 ee96975adb44
|
||||
(the candidate must not appear above)
|
||||
|
||||
## 5. business writes through LB during the exclusion
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 810.163,
|
||||
"successful_rps": 746.262,
|
||||
|
||||
## 6. cleanup
|
||||
stats after cleanup: api1=UP api2=UP api3=MAINT (resolution) api4=MAINT (resolution) api5=MAINT (resolution) api6=MAINT (resolution) api7=MAINT (resolution) api8=MAINT (resolution) BACKEND=UP
|
||||
stats after cleanup: api1=UP api2=MAINT (resolution) api3=UP api4=MAINT (resolution) api5=MAINT (resolution) api6=MAINT (resolution) api7=MAINT (resolution) api8=MAINT (resolution) BACKEND=UP
|
||||
|
||||
Reference in New Issue
Block a user