lab4: отчёт и доказательства итогового прогона

This commit is contained in:
2026-11-04 21:07:54 +03:00
parent 5119d0b5fd
commit 7b0b2fba64
30 changed files with 1183 additions and 17 deletions
+3
View File
@@ -0,0 +1,3 @@
source_commit=5119d0b5fdcf247c86a773f03ab6fe3adeee8ba0
run=https://github.com/CharaWein/2026_lab3/actions/runs/41881945345
stand=success
+10
View File
@@ -0,0 +1,10 @@
2026-11-04T17:59:52Z
Docker Compose version v2.38.2
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
mtusi2026lab4-api-1 mtusi2026lab4-api:local "/app/api" api 16 seconds ago Up 6 seconds (healthy) 8080/tcp
mtusi2026lab4-api-2 mtusi2026lab4-api:local "/app/api" api 16 seconds ago Up 7 seconds (healthy) 8080/tcp
mtusi2026lab4-lb-1 haproxy:3.0.5-alpine "docker-entrypoint.s…" lb 16 seconds ago Up 1 second 127.0.0.1:8080->8080/tcp, 127.0.0.1:8404->8404/tcp
mtusi2026lab4-postgres-1 postgres:16.4-alpine "docker-entrypoint.s…" postgres 16 seconds ago Up 15 seconds (healthy) 5432/tcp
mtusi2026lab4-reconciler-1 mtusi2026lab4-api:local "/app/reconcile --ap…" reconciler 16 seconds ago Up 7 seconds (healthy) 8080/tcp
mtusi2026lab4-redis-1 redis:7.4.1-alpine "docker-entrypoint.s…" redis 16 seconds ago Up 15 seconds (healthy) 6379/tcp
mtusi2026lab4-s3-1 bitnamilegacy/minio:2025.4.22@sha256:50cec18ac4184af4671a78aedd5554942c8ae105d51a465fa82037949046da01 "/bin/bash -c 'expor…" s3 16 seconds ago Up 15 seconds (healthy) 9000-9001/tcp
+10
View File
@@ -0,0 +1,10 @@
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
mtusi2026lab4-api-3 mtusi2026lab4-api:local "/app/api" api About a minute ago Up About a minute (healthy) 8080/tcp
mtusi2026lab4-api-4 mtusi2026lab4-api:local "/app/api" api About a minute ago Up About a minute (healthy) 8080/tcp
mtusi2026lab4-lb-1 haproxy:3.0.5-alpine "docker-entrypoint.s…" lb 5 minutes ago Up 3 minutes 127.0.0.1:8080->8080/tcp, 127.0.0.1:8404->8404/tcp
mtusi2026lab4-migrate-1 migrate/migrate:v4.17.0 "/bin/sh -c 'exec mi…" migrate 5 minutes ago Exited (0) 3 minutes ago
mtusi2026lab4-postgres-1 postgres:16.4-alpine "docker-entrypoint.s…" postgres 5 minutes ago Up 3 minutes (healthy) 5432/tcp
mtusi2026lab4-reconciler-1 mtusi2026lab4-api:local "/app/reconcile --ap…" reconciler 5 minutes ago Up 3 minutes (healthy) 8080/tcp
mtusi2026lab4-redis-1 redis:7.4.1-alpine "docker-entrypoint.s…" redis 5 minutes ago Up 3 minutes (healthy) 6379/tcp
mtusi2026lab4-s3-1 bitnamilegacy/minio:2025.4.22@sha256:50cec18ac4184af4671a78aedd5554942c8ae105d51a465fa82037949046da01 "/bin/bash -c 'expor…" s3 5 minutes ago Up 3 minutes (healthy) 9000-9001/tcp
mtusi2026lab4-s3-init-1 bitnamilegacy/minio-client:2025.4.16@sha256:8a86e441decf053093c5977d49290298295f850c7843652f93e970ab15871dd1 "/bin/sh /init/init.…" s3-init 5 minutes ago Exited (0) 3 minutes ago
+7
View File
@@ -0,0 +1,7 @@
mtusi2026lab4-api-4 0.18% 8.203MiB / 256MiB
mtusi2026lab4-api-3 0.09% 8.07MiB / 256MiB
mtusi2026lab4-lb-1 0.13% 8.844MiB / 128MiB
mtusi2026lab4-reconciler-1 0.00% 3.941MiB / 128MiB
mtusi2026lab4-redis-1 0.48% 4.207MiB / 256MiB
mtusi2026lab4-postgres-1 0.07% 73.31MiB / 512MiB
mtusi2026lab4-s3-1 0.00% 335.9MiB / 512MiB
+8
View File
@@ -0,0 +1,8 @@
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
{"observed_instances_before": 2, "successful_writes": 144, "failed_attempts": 0, "first_recovery_seconds": 3.486}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
-- контейнеры api после stop-one:
mtusi2026lab4-api-1 79e9bafcf0e6 Up 30 seconds (healthy)
mtusi2026lab4-api-2 f758f63bab9a Exited (0) 11 seconds ago
mtusi2026lab4-api-1 Up 38 seconds (healthy)
mtusi2026lab4-api-2 Up 6 seconds (healthy)
+8
View File
@@ -0,0 +1,8 @@
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
{"observed_instances_before": 2, "successful_writes": 144, "failed_attempts": 0, "first_recovery_seconds": 3.353}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
-- контейнеры api после stop-one:
mtusi2026lab4-api-1 79e9bafcf0e6 Up 54 seconds (healthy)
mtusi2026lab4-api-2 f758f63bab9a Exited (0) 12 seconds ago
mtusi2026lab4-api-1 Up About a minute (healthy)
mtusi2026lab4-api-2 Up 6 seconds (healthy)
+64
View File
@@ -0,0 +1,64 @@
{
"concurrency": 4,
"replicas": 2,
"total": {
"seconds": 53.79,
"ok": 18996,
"errors": 0,
"ok_rps": 353.2
},
"confirmed_writes": 9499,
"stored_messages": 9501,
"duplicates": 0,
"lost_confirmed": 0,
"per_replica": [
{
"target_instance": "79e9bafcf0e6",
"docker_stop_seconds": 3.62,
"before": {
"seconds": 5.0,
"ok": 1787,
"errors": 0,
"ok_rps": 357.4
},
"during_stop_and_observe": {
"seconds": 15.0,
"ok": 5435,
"errors": 0,
"ok_rps": 362.3
},
"errors_after_stop": 0,
"recovery_seconds": 0.0,
"target_last_served_after_stop_seconds": 0.8,
"other_instances_after": [
"f758f63bab9a"
],
"restore_healthy_seconds": 6.37,
"restore_serving_via_lb_seconds": 6.37
},
{
"target_instance": "f758f63bab9a",
"docker_stop_seconds": 4.1,
"before": {
"seconds": 5.0,
"ok": 1738,
"errors": 0,
"ok_rps": 347.6
},
"during_stop_and_observe": {
"seconds": 15.0,
"ok": 5454,
"errors": 0,
"ok_rps": 363.6
},
"errors_after_stop": 0,
"recovery_seconds": 0.0,
"target_last_served_after_stop_seconds": 0.64,
"other_instances_after": [
"79e9bafcf0e6"
],
"restore_healthy_seconds": 6.45,
"restore_serving_via_lb_seconds": 6.45
}
]
}
+29
View File
@@ -0,0 +1,29 @@
ok.png image/png 106 -> 201
ok.jpg image/jpeg 900 -> 201
%D1%84%D0%BE%D1%82%D0%BE%20%F0%9F%98%80. image/png 106 -> 201
params.png image/png; charset=binary 106 -> 201
near-limit.png image/png 10288524 -> 201
too-big.png (Content-Length) image/png 10485761 -> 413
too-big-chunked.png (no Content-Length) image/png 11534336 -> 413
bomb.png image/png 66 -> 413
over-pixels.png image/png 66 -> 413
truncated.png image/png 53 -> 415
corrupt.png image/png 106 -> 415
truncated.jpg image/jpeg 898 -> 415
mime-swap.png image/jpeg 106 -> 415
mime-swap.jpg image/png 900 -> 415
text.png image/png 23 -> 415
gif.gif image/gif 14 -> 415
ctype-missing.png application/octet-stream 106 -> 415
empty.png image/png 0 -> 415
short-data.png image/png 68 -> 415
..%2Fetc%2Fpasswd image/png 106 -> 400
a%5Cb.png image/png 106 -> 400
nul%00.png image/png 106 -> 400
bell%07.png image/png 106 -> 400
%20%20%20 image/png 106 -> 400
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx image/png 106 -> 400
image/png 106 -> 400
eve.png image/png 106 -> 404
foreign.png image/png 106 -> 201
PASS: attachment negative suite (28 upload cases, no 5xx)
+8
View File
@@ -0,0 +1,8 @@
api-2 | {"time":"2026-11-04T17:59:08.618848913Z","level":"INFO","msg":"attachment upload compensated","attachment_id":"8376ff59-6e3b-434b-851f-c94203d9d4fb","cause":"unsupported media type"}
api-2 | {"time":"2026-11-04T17:59:08.649043939Z","level":"INFO","msg":"attachment upload compensated","attachment_id":"1dec380c-52c3-49ce-8eaa-d1c9b7010a28","cause":"unsupported media type"}
api-2 | {"time":"2026-11-04T17:59:21.56713159Z","level":"WARN","msg":"s3 get failed","attachment_id":"61eea43b-d38d-43ce-82f8-869e27973710","err":"s3 stat: Head \"http://s3:9000/messenger-attachments/a/4e3fa29e-8850-4823-ab42-fab04574a248/61eea43b-d38d-43ce-82f8-869e27973710\": dial tcp: lookup s3 on 127.0.0.11:53: no such host"}
api-1 | {"time":"2026-11-04T17:59:08.607887582Z","level":"INFO","msg":"attachment upload compensated","attachment_id":"3d005de4-f4dd-41db-8e29-a8af5d808c2b","cause":"unsupported media type"}
api-1 | {"time":"2026-11-04T17:59:08.626900518Z","level":"INFO","msg":"attachment upload compensated","attachment_id":"aca7c508-c906-46db-8830-afe0f0ec1917","cause":"unsupported media type"}
api-1 | {"time":"2026-11-04T17:59:21.278574756Z","level":"WARN","msg":"compensation: delete object failed, reconciler will retry","attachment_id":"cb3c808e-1d56-48a2-b1f4-928325f04c92","err":"s3 delete: Delete \"http://s3:9000/messenger-attachments/a/4e3fa29e-8850-4823-ab42-fab04574a248/cb3c808e-1d56-48a2-b1f4-928325f04c92\": dial tcp: lookup s3 on 127.0.0.11:53: no such host"}
api-1 | {"time":"2026-11-04T17:59:21.280005994Z","level":"INFO","msg":"attachment upload compensated","attachment_id":"cb3c808e-1d56-48a2-b1f4-928325f04c92","cause":"unavailable"}
api-1 | {"time":"2026-11-04T17:59:31.143854842Z","level":"INFO","msg":"attachment upload compensated","attachment_id":"9abeb5ec-bae5-4f6e-9616-5db53e004b34","cause":"unavailable"}
+7
View File
@@ -0,0 +1,7 @@
mtusi2026lab4-lb-1 0.12% 8.504MiB / 128MiB
mtusi2026lab4-api-2 2.99% 13.17MiB / 256MiB
mtusi2026lab4-api-1 2.96% 14.02MiB / 256MiB
mtusi2026lab4-reconciler-1 0.00% 4.086MiB / 128MiB
mtusi2026lab4-redis-1 0.49% 3.648MiB / 256MiB
mtusi2026lab4-s3-1 0.00% 438.5MiB / 512MiB
mtusi2026lab4-postgres-1 0.05% 67.9MiB / 512MiB
+16
View File
@@ -0,0 +1,16 @@
{
"scenario": "db-gap",
"result": {
"client_status": 504,
"seconds": 53.2,
"after_gap": {
"row_status": "ready",
"objects": 1
},
"reconciler_fixed": {},
"after_reconcile": {
"row_status": "ready",
"objects": 1
}
}
}
+11
View File
@@ -0,0 +1,11 @@
{
"scenario": "failover",
"result": {
"uploaded_by": "5c22e6c38769",
"downloaded_by": [
"cd9621e01c62"
],
"sha256": "9cd8ae086706327908419e4e9782e8ed003310802f9381e4f8776a81079460e5",
"stopped_container": "5c22e6c38769"
}
}
+9
View File
@@ -0,0 +1,9 @@
{
"scenario": "interrupt",
"result": {
"sent_bytes": 1048576,
"declared_bytes": 4192910,
"rows_after": 0,
"objects_after": 0
}
}
+40
View File
@@ -0,0 +1,40 @@
{
"scenario": "memory",
"result": {
"file_bytes": 10187085,
"runs": [
{
"parallel": 10,
"ok": 10,
"failed": [],
"max_seconds": 0.88,
"baseline_peak_mib": {
"cd9621e01c62": 7.9,
"5c22e6c38769": 7.3
},
"peak_mib": {
"cd9621e01c62": 17.3,
"5c22e6c38769": 25.0
},
"payload_total_mib": 97.2,
"max_peak_growth_mib": 17.7
},
{
"parallel": 20,
"ok": 20,
"failed": [],
"max_seconds": 2.22,
"baseline_peak_mib": {
"cd9621e01c62": 8.1,
"5c22e6c38769": 7.4
},
"peak_mib": {
"cd9621e01c62": 47.8,
"5c22e6c38769": 42.7
},
"payload_total_mib": 194.3,
"max_peak_growth_mib": 39.7
}
]
}
}
+13
View File
@@ -0,0 +1,13 @@
{
"scenario": "s3-outage",
"result": {
"upload_status_during_outage": 503,
"upload_error_seconds": 0.38,
"download_status_during_outage": 503,
"metadata_during_outage": "ready",
"text_message_during_outage": 201,
"readiness_during_outage": 200,
"intents_left": 0,
"upload_after_recovery": "ready"
}
}
+22
View File
@@ -0,0 +1,22 @@
{
"scenario": "security",
"result": {
"anonymous_get": "403",
"anonymous_list": "403",
"api_key_own_bucket": "allowed",
"api_key_make_bucket": "denied",
"api_key_admin": "denied",
"api_key_visible_buckets": [
"messenger-attachments"
],
"bootstrap_runs": [
0,
0
],
"objects_before_after": [
10,
10
],
"s3_published_ports": "9000-9001/tcp"
}
}
+41
View File
@@ -0,0 +1,41 @@
go: downloading github.com/jackc/pgx/v5 v5.11.0
go: downloading github.com/redis/go-redis/v9 v9.23.0
go: downloading github.com/google/uuid v1.6.0
go: downloading golang.org/x/crypto v0.58.0
go: downloading github.com/minio/minio-go/v7 v7.4.1
go: downloading github.com/jackc/puddle/v2 v2.2.2
go: downloading github.com/jackc/pgpassfile v1.0.0
go: downloading github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761
go: downloading golang.org/x/text v0.43.0
go: downloading golang.org/x/sys v0.49.0
go: downloading github.com/cespare/xxhash/v2 v2.3.0
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading github.com/klauspost/compress v1.19.2
go: downloading github.com/klauspost/crc32 v1.3.0
go: downloading github.com/minio/crc64nvme v1.1.1
go: downloading github.com/minio/md5-simd v1.1.2
go: downloading github.com/zeebo/xxh3 v1.1.0
go: downloading go.yaml.in/yaml/v3 v3.0.5
go: downloading golang.org/x/net v0.60.0
go: downloading gopkg.in/ini.v1 v1.67.3
go: downloading golang.org/x/sync v0.24.0
go: downloading go.uber.org/atomic v1.12.0
go: downloading github.com/klauspost/cpuid/v2 v2.4.0
go: downloading github.com/rs/xid v1.6.0
go: downloading github.com/tinylib/msgp v1.6.4
go: downloading github.com/philhofer/fwd v1.2.0
? github.com/charawein/mtusi2026lab4/cmd/api [no test files]
? github.com/charawein/mtusi2026lab4/cmd/reconcile [no test files]
? github.com/charawein/mtusi2026lab4/internal/config [no test files]
? github.com/charawein/mtusi2026lab4/internal/domain [no test files]
ok github.com/charawein/mtusi2026lab4/internal/imagecheck 0.026s
ok github.com/charawein/mtusi2026lab4/internal/reconcile 0.009s
? github.com/charawein/mtusi2026lab4/internal/repository [no test files]
? github.com/charawein/mtusi2026lab4/internal/repository/postgres [no test files]
? github.com/charawein/mtusi2026lab4/internal/repository/redis [no test files]
ok github.com/charawein/mtusi2026lab4/internal/service 0.009s
? github.com/charawein/mtusi2026lab4/internal/storage [no test files]
? github.com/charawein/mtusi2026lab4/internal/transport/http [no test files]
? github.com/charawein/mtusi2026lab4/internal/transport/http/middleware [no test files]
? github.com/charawein/mtusi2026lab4/internal/transport/httputil [no test files]
? github.com/charawein/mtusi2026lab4/student-tests/genfixtures [no test files]
+88
View File
@@ -0,0 +1,88 @@
{
"rounds": 10,
"parallel_per_round": 16,
"distinct_instances_seen": 2,
"duplicates_found": 0,
"per_round": [
{
"round": 0,
"requests": 16,
"status_201": 16,
"distinct_messages": 1,
"stored": 1,
"instances": 2
},
{
"round": 1,
"requests": 16,
"status_201": 16,
"distinct_messages": 1,
"stored": 1,
"instances": 2
},
{
"round": 2,
"requests": 16,
"status_201": 16,
"distinct_messages": 1,
"stored": 1,
"instances": 2
},
{
"round": 3,
"requests": 16,
"status_201": 16,
"distinct_messages": 1,
"stored": 1,
"instances": 2
},
{
"round": 4,
"requests": 16,
"status_201": 16,
"distinct_messages": 1,
"stored": 1,
"instances": 2
},
{
"round": 5,
"requests": 16,
"status_201": 16,
"distinct_messages": 1,
"stored": 1,
"instances": 2
},
{
"round": 6,
"requests": 16,
"status_201": 16,
"distinct_messages": 1,
"stored": 1,
"instances": 2
},
{
"round": 7,
"requests": 16,
"status_201": 16,
"distinct_messages": 1,
"stored": 1,
"instances": 2
},
{
"round": 8,
"requests": 16,
"status_201": 16,
"distinct_messages": 1,
"stored": 1,
"instances": 2
},
{
"round": 9,
"requests": 16,
"status_201": 16,
"distinct_messages": 1,
"stored": 1,
"instances": 2
}
]
}
+8
View File
@@ -0,0 +1,8 @@
bitnamilegacy/minio-client:2025.4.16@sha256:8a86e441decf053093c5977d49290298295f850c7843652f93e970ab15871dd1 bitnamilegacy/minio-client@sha256:8a86e441decf053093c5977d49290298295f850c7843652f93e970ab15871dd1
bitnamilegacy/minio:2025.4.22@sha256:50cec18ac4184af4671a78aedd5554942c8ae105d51a465fa82037949046da01 bitnamilegacy/minio@sha256:50cec18ac4184af4671a78aedd5554942c8ae105d51a465fa82037949046da01
haproxy:3.0.5-alpine haproxy@sha256:43a2591a6a62a41dd22edb4452880e9c70de489fbd7c54ffb52d035cccbfe949
migrate/migrate:v4.17.0 migrate/migrate@sha256:4d017c6fb5997127093648cab09e63d377997125c3d3dcca18e5d1c847da49fa
mtusi2026lab4-api:local
local-build
postgres:16.4-alpine postgres@sha256:5660c2cbfea50c7a9127d17dc4e48543eedd3d7a41a595a2dfa572471e37e64c
redis:7.4.1-alpine redis@sha256:c1e88455c85225310bbea54816e9c3f4b5295815e6dbf80c34d40afc6df28275
+2
View File
@@ -0,0 +1,2 @@
79e9bafcf0e6 10
f758f63bab9a 10
+18
View File
@@ -0,0 +1,18 @@
-- до:
mtusi2026lab4-api-1 Up About a minute (healthy)
mtusi2026lab4-api-2 Up 6 seconds (healthy)
mtusi2026lab4-lb-1 Up 57 seconds
mtusi2026lab4-postgres-1 Up About a minute (healthy)
mtusi2026lab4-reconciler-1 Up About a minute (healthy)
mtusi2026lab4-redis-1 Up About a minute (healthy)
mtusi2026lab4-s3-1 Up About a minute (healthy)
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
-- после:
mtusi2026lab4-api-1 Up 6 seconds (healthy)
mtusi2026lab4-api-2 Up 6 seconds (healthy)
mtusi2026lab4-lb-1 Up Less than a second
mtusi2026lab4-postgres-1 Up 14 seconds (healthy)
mtusi2026lab4-reconciler-1 Up 6 seconds (healthy)
mtusi2026lab4-redis-1 Up 14 seconds (healthy)
mtusi2026lab4-s3-1 Up 14 seconds (healthy)
+3
View File
@@ -0,0 +1,3 @@
PASS: whitespace-only password rejected with 400 (3 variants)
PASS: Redis ACL -incr: message visible on every next read (3 in history)
PASS: Redis ACL -incr -del -unlink -scan: message visible on every next read (4 in history)
+89
View File
@@ -0,0 +1,89 @@
-- до:
mtusi2026lab4-api-1 79e9bafcf0e6 Up About a minute (healthy)
mtusi2026lab4-api-2 f758f63bab9a Up About a minute (healthy)
#1 [internal] load local bake definitions
#1 reading from stdin 380B done
#1 DONE 0.0s
#2 [internal] load build definition from Dockerfile
#2 transferring dockerfile: 2.55kB done
#2 DONE 0.0s
#3 [internal] load metadata for docker.io/library/golang:1.26-alpine@sha256:27f2d3b83cfc5803c8078f8e730af0f7c431bf067afaec8f60a36fb763187cba
#3 DONE 0.0s
#4 [internal] load metadata for docker.io/library/alpine:3.20@sha256:d9e853e87e55526f6b2917df91a2115c36dd7c696a35be12163d44e6e2a4b6bc
#4 DONE 0.0s
#5 [internal] load .dockerignore
#5 transferring context: 212B 0.0s done
#5 DONE 0.0s
#6 [builder 1/6] FROM docker.io/library/golang:1.26-alpine@sha256:27f2d3b83cfc5803c8078f8e730af0f7c431bf067afaec8f60a36fb763187cba
#6 DONE 0.0s
#7 [stage-1 1/6] FROM docker.io/library/alpine:3.20@sha256:d9e853e87e55526f6b2917df91a2115c36dd7c696a35be12163d44e6e2a4b6bc
#7 DONE 0.0s
#8 [internal] load build context
#8 transferring context: 6.52kB 0.0s done
#8 DONE 0.0s
#9 [builder 4/6] RUN go mod download
#9 CACHED
#10 [builder 3/6] COPY go.mod go.sum ./
#10 CACHED
#11 [stage-1 4/6] WORKDIR /app
#11 CACHED
#12 [builder 5/6] COPY . .
#12 CACHED
#13 [stage-1 3/6] RUN addgroup -g 1001 -S appgroup && adduser -u 1001 -S appuser -G appgroup
#13 CACHED
#14 [stage-1 5/6] COPY --from=builder --chown=appuser:appgroup /out/api /app/api
#14 CACHED
#15 [builder 2/6] WORKDIR /src
#15 CACHED
#16 [builder 6/6] RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -trimpath -o /out/ ./cmd/api ./cmd/reconcile
#16 CACHED
#17 [stage-1 2/6] RUN apk --no-cache add ca-certificates tzdata
#17 CACHED
#18 [stage-1 6/6] COPY --from=builder --chown=appuser:appgroup /out/reconcile /app/reconcile
#18 CACHED
#19 exporting to image
#19 exporting layers done
#19 writing image sha256:be1f1cecb516f3b198bff5b90f6ed74a70e03b3fe35d0737d784f04fa8b66025 done
#19 naming to docker.io/library/mtusi2026lab4-api:local done
#19 DONE 0.0s
#20 resolving provenance for metadata file
#20 DONE 0.0s
api Built
Container mtusi2026lab4-postgres-1 Running
no change
Container mtusi2026lab4-api-1 Running
Container mtusi2026lab4-api-2 Running
Container mtusi2026lab4-api-3 Creating
Container mtusi2026lab4-api-3 Created
Container mtusi2026lab4-api-3 Starting
Container mtusi2026lab4-api-3 Started
replaced /mtusi2026lab4-api-1
Container mtusi2026lab4-api-2 Running
Container mtusi2026lab4-api-3 Running
Container mtusi2026lab4-api-4 Creating
Container mtusi2026lab4-api-4 Created
Container mtusi2026lab4-api-4 Starting
Container mtusi2026lab4-api-4 Started
replaced /mtusi2026lab4-api-2
mtusi2026lab4-api-3 916a2f8f2e08 mtusi2026lab4-api:local Up 23 seconds (healthy)
mtusi2026lab4-api-4 446b3ece9b45 mtusi2026lab4-api:local Up 11 seconds (healthy)
-- замена заняла 29 s (внутри 90 s нагрузки)
+17
View File
@@ -0,0 +1,17 @@
{
"lab": 4,
"workload": "closed-loop POST messages; no automatic retries",
"requested_duration_seconds": 90.0,
"elapsed_seconds": 90.071,
"concurrency": 4,
"successful_requests": 34743,
"failed_requests": 0,
"error_ratio": 0.0,
"successful_rps": 385.729,
"successful_latency_ms": {
"p50": 9.536,
"p95": 17.293,
"p99": 25.27
},
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
}
+6
View File
@@ -0,0 +1,6 @@
2
total used free shared buff/cache available
Mem: 7932 1454 2206 90 4676 6478
Swap: 3071 0 3071
28.0.4
Docker Compose version v2.38.2
+1
View File
@@ -0,0 +1 @@
PASS: lab4 public API scenario; infrastructure and grading evidence remain separate.
+119
View File
@@ -0,0 +1,119 @@
{
"preexisting_rows": 4,
"object_size_bytes": 1024,
"runs": [
{
"bench_pairs": 1000,
"rows_scanned": 1004,
"objects_scanned": 1004,
"duration_ms_runs": [
96,
134,
77
],
"duration_ms_median": 96,
"us_per_pair": 95.6,
"calls": {
"s3_list_pages": 2
},
"heap_alloc_mb": 2.3624496459960938,
"found": {},
"wait_ms_runs": [
{
"db_stream": 0,
"s3_list": 96
},
{
"db_stream": 74,
"s3_list": 59
},
{
"db_stream": 0,
"s3_list": 76
}
],
"seed_seconds": 4.6
},
{
"bench_pairs": 10000,
"rows_scanned": 10004,
"objects_scanned": 10004,
"duration_ms_runs": [
2642,
2959,
2647
],
"duration_ms_median": 2647,
"us_per_pair": 264.6,
"calls": {
"s3_list_pages": 11
},
"heap_alloc_mb": 3.414703369140625,
"found": {},
"wait_ms_runs": [
{
"db_stream": 58,
"s3_list": 2582
},
{
"db_stream": 92,
"s3_list": 2863
},
{
"db_stream": 235,
"s3_list": 2410
}
],
"seed_seconds": 36.3
},
{
"bench_pairs": 30000,
"rows_scanned": 30004,
"objects_scanned": 30004,
"duration_ms_runs": [
11483,
8374,
7803
],
"duration_ms_median": 8374,
"us_per_pair": 279.1,
"calls": {
"s3_list_pages": 31
},
"heap_alloc_mb": 2.1787872314453125,
"found": {},
"wait_ms_runs": [
{
"db_stream": 157,
"s3_list": 11235
},
{
"db_stream": 127,
"s3_list": 8238
},
{
"db_stream": 292,
"s3_list": 7502
}
],
"seed_seconds": 81.8
}
],
"with_1pct_faults": {
"injected_missing": 150,
"injected_orphans": 150,
"duration_ms": 10344,
"found": {
"missing_object": 150
},
"skipped": {
"fresh_missing": 1,
"fresh_object": 151
},
"calls": {
"s3_list_pages": 31,
"s3_stat": 150
}
},
"note": "dry-run, grace 1h: свежие сироты учитываются как skipped.fresh_object, а не удаляются"
}
+327
View File
@@ -0,0 +1,327 @@
{
"injected": {
"orphan_old": 1,
"orphan_fresh": 1,
"deleted_objects": 3,
"resized_object": 1,
"stale_intents": 2,
"inflight_intent": 1
},
"dry_run_found": {
"orphan_object": 1,
"stale_intent": 2,
"missing_object": 3,
"size_mismatch": 1
},
"dry_run_state_changed": false,
"apply_found": {
"orphan_object": 1,
"stale_intent": 2,
"missing_object": 3,
"size_mismatch": 1
},
"second_apply_actions": 0,
"restored": 1,
"after_grace": {
"purge_missing": 2,
"orphan_object": 1
},
"never_deleted": [
"fresh orphan (until grace)",
"in-flight intent",
"referenced quarantined row",
"healthy rows"
],
"reports": {
"dry_run": {
"dry_run": true,
"grace_seconds": 8,
"cutoff": "2026-11-04T17:58:32.353041Z",
"duration_ms": 9,
"rows_scanned": 9,
"objects_scanned": 7,
"consistent": 2,
"found": {
"missing_object": 3,
"orphan_object": 1,
"size_mismatch": 1,
"stale_intent": 2
},
"fixed": {},
"skipped": {
"fresh_intent": 1,
"fresh_object": 1
},
"calls": {
"db_haskey": 1,
"s3_list_pages": 1,
"s3_stat": 3
},
"heap_alloc_mb": 1.617706298828125,
"wait_ms": {
"db_stream": 1,
"s3_list": 4
},
"errors": [],
"items": [
{
"kind": "missing_object",
"key": "a/556b5ec5-fe99-4946-bcdb-7e7ed5e60f06/487d3da8-a285-4ce5-9899-6e38a7cd6fe1",
"attachment_id": "487d3da8-a285-4ce5-9899-6e38a7cd6fe1",
"action": "would_quarantine"
},
{
"kind": "missing_object",
"key": "a/556b5ec5-fe99-4946-bcdb-7e7ed5e60f06/53cd96c6-d5c3-47ab-a43a-816dda2374a0",
"attachment_id": "53cd96c6-d5c3-47ab-a43a-816dda2374a0",
"action": "would_quarantine"
},
{
"kind": "missing_object",
"key": "a/556b5ec5-fe99-4946-bcdb-7e7ed5e60f06/6a0aafce-13bd-4f7b-8c9d-0b69eff7f0bf",
"attachment_id": "6a0aafce-13bd-4f7b-8c9d-0b69eff7f0bf",
"action": "would_quarantine"
},
{
"kind": "size_mismatch",
"key": "a/556b5ec5-fe99-4946-bcdb-7e7ed5e60f06/8c99927b-f99a-4385-901e-68284f99c598",
"attachment_id": "8c99927b-f99a-4385-901e-68284f99c598",
"action": "would_quarantine",
"detail": "db=21584 s3=777"
},
{
"kind": "orphan_object",
"key": "a/556b5ec5-fe99-4946-bcdb-7e7ed5e60f06/a6d04b87-c491-4ed5-81fa-ea96e5d08ee9",
"action": "would_delete_object",
"detail": "size=5000 modified=2026-11-04T17:58:29Z"
},
{
"kind": "stale_intent",
"key": "a/556b5ec5-fe99-4946-bcdb-7e7ed5e60f06/d0063925-daca-4082-ac3a-a10efd6a1444",
"attachment_id": "d0063925-daca-4082-ac3a-a10efd6a1444",
"action": "would_delete_object_and_intent",
"detail": "updated_at=2026-11-04T17:28:29Z"
},
{
"kind": "stale_intent",
"key": "a/556b5ec5-fe99-4946-bcdb-7e7ed5e60f06/eb82fd74-7aab-43af-b9a5-4e1f40e78112",
"attachment_id": "eb82fd74-7aab-43af-b9a5-4e1f40e78112",
"action": "would_delete_intent",
"detail": "updated_at=2026-11-04T17:28:29Z"
}
]
},
"apply": {
"dry_run": false,
"grace_seconds": 8,
"cutoff": "2026-11-04T17:58:33.32222Z",
"duration_ms": 21,
"rows_scanned": 9,
"objects_scanned": 7,
"consistent": 2,
"found": {
"missing_object": 3,
"orphan_object": 1,
"size_mismatch": 1,
"stale_intent": 2
},
"fixed": {
"missing_object": 3,
"orphan_object": 1,
"size_mismatch": 1,
"stale_intent": 2
},
"skipped": {
"fresh_intent": 1,
"fresh_object": 1
},
"calls": {
"db_delete": 2,
"db_haskey": 1,
"db_update": 4,
"s3_delete": 2,
"s3_list_pages": 1,
"s3_stat": 3
},
"heap_alloc_mb": 1.6486282348632812,
"wait_ms": {
"db_stream": 2,
"s3_list": 8
},
"errors": [],
"items": [
{
"kind": "missing_object",
"key": "a/556b5ec5-fe99-4946-bcdb-7e7ed5e60f06/487d3da8-a285-4ce5-9899-6e38a7cd6fe1",
"attachment_id": "487d3da8-a285-4ce5-9899-6e38a7cd6fe1",
"action": "quarantine"
},
{
"kind": "missing_object",
"key": "a/556b5ec5-fe99-4946-bcdb-7e7ed5e60f06/53cd96c6-d5c3-47ab-a43a-816dda2374a0",
"attachment_id": "53cd96c6-d5c3-47ab-a43a-816dda2374a0",
"action": "quarantine"
},
{
"kind": "missing_object",
"key": "a/556b5ec5-fe99-4946-bcdb-7e7ed5e60f06/6a0aafce-13bd-4f7b-8c9d-0b69eff7f0bf",
"attachment_id": "6a0aafce-13bd-4f7b-8c9d-0b69eff7f0bf",
"action": "quarantine"
},
{
"kind": "size_mismatch",
"key": "a/556b5ec5-fe99-4946-bcdb-7e7ed5e60f06/8c99927b-f99a-4385-901e-68284f99c598",
"attachment_id": "8c99927b-f99a-4385-901e-68284f99c598",
"action": "quarantine",
"detail": "db=21584 s3=777"
},
{
"kind": "orphan_object",
"key": "a/556b5ec5-fe99-4946-bcdb-7e7ed5e60f06/a6d04b87-c491-4ed5-81fa-ea96e5d08ee9",
"action": "delete_object",
"detail": "size=5000 modified=2026-11-04T17:58:29Z"
},
{
"kind": "stale_intent",
"key": "a/556b5ec5-fe99-4946-bcdb-7e7ed5e60f06/d0063925-daca-4082-ac3a-a10efd6a1444",
"attachment_id": "d0063925-daca-4082-ac3a-a10efd6a1444",
"action": "delete_object_and_intent",
"detail": "updated_at=2026-11-04T17:28:29Z"
},
{
"kind": "stale_intent",
"key": "a/556b5ec5-fe99-4946-bcdb-7e7ed5e60f06/eb82fd74-7aab-43af-b9a5-4e1f40e78112",
"attachment_id": "eb82fd74-7aab-43af-b9a5-4e1f40e78112",
"action": "delete_intent",
"detail": "updated_at=2026-11-04T17:28:29Z"
}
]
},
"second_apply": {
"dry_run": false,
"grace_seconds": 8,
"cutoff": "2026-11-04T17:58:34.437947Z",
"duration_ms": 7,
"rows_scanned": 7,
"objects_scanned": 5,
"consistent": 2,
"found": {},
"fixed": {},
"skipped": {
"fresh_intent": 1,
"fresh_missing": 4,
"fresh_object": 1
},
"calls": {
"s3_list_pages": 1
},
"heap_alloc_mb": 1.5324172973632812,
"wait_ms": {
"db_stream": 1,
"s3_list": 5
},
"errors": [],
"items": []
},
"restore": {
"dry_run": false,
"grace_seconds": 8,
"cutoff": "2026-11-04T17:58:35.409159Z",
"duration_ms": 9,
"rows_scanned": 7,
"objects_scanned": 6,
"consistent": 2,
"found": {
"restored": 1
},
"fixed": {
"restored": 1
},
"skipped": {
"fresh_intent": 1,
"fresh_missing": 3,
"fresh_object": 1
},
"calls": {
"db_update": 1,
"s3_list_pages": 1
},
"heap_alloc_mb": 1.5385284423828125,
"wait_ms": {
"db_stream": 2,
"s3_list": 4
},
"errors": [],
"items": [
{
"kind": "restored",
"key": "a/556b5ec5-fe99-4946-bcdb-7e7ed5e60f06/53cd96c6-d5c3-47ab-a43a-816dda2374a0",
"attachment_id": "53cd96c6-d5c3-47ab-a43a-816dda2374a0",
"action": "set_ready"
}
]
},
"after_grace": {
"dry_run": false,
"grace_seconds": 8,
"cutoff": "2026-11-04T17:58:44.831107Z",
"duration_ms": 15,
"rows_scanned": 7,
"objects_scanned": 6,
"consistent": 3,
"found": {
"orphan_object": 1,
"purge_missing": 2,
"stale_intent": 1
},
"fixed": {
"orphan_object": 1,
"purge_missing": 2,
"stale_intent": 1
},
"skipped": {
"referenced_missing_kept": 1
},
"calls": {
"db_delete": 3,
"db_haskey": 1,
"db_referenced": 3,
"s3_delete": 2,
"s3_list_pages": 1
},
"heap_alloc_mb": 1.608062744140625,
"wait_ms": {
"db_stream": 1,
"s3_list": 5
},
"errors": [],
"items": [
{
"kind": "orphan_object",
"key": "a/556b5ec5-fe99-4946-bcdb-7e7ed5e60f06/09c263a0-158e-47eb-8695-f5e9317b103a",
"action": "delete_object",
"detail": "size=3000 modified=2026-11-04T17:58:39Z"
},
{
"kind": "purge_missing",
"key": "a/556b5ec5-fe99-4946-bcdb-7e7ed5e60f06/6a0aafce-13bd-4f7b-8c9d-0b69eff7f0bf",
"attachment_id": "6a0aafce-13bd-4f7b-8c9d-0b69eff7f0bf",
"action": "delete_row"
},
{
"kind": "stale_intent",
"key": "a/556b5ec5-fe99-4946-bcdb-7e7ed5e60f06/8c948a33-b8e3-4e5c-bfe9-4331b1772d0e",
"attachment_id": "8c948a33-b8e3-4e5c-bfe9-4331b1772d0e",
"action": "delete_object_and_intent",
"detail": "updated_at=2026-11-04T17:58:39Z"
},
{
"kind": "purge_missing",
"key": "a/556b5ec5-fe99-4946-bcdb-7e7ed5e60f06/8c99927b-f99a-4385-901e-68284f99c598",
"attachment_id": "8c99927b-f99a-4385-901e-68284f99c598",
"action": "delete_row"
}
]
}
}
}
+6
View File
@@ -0,0 +1,6 @@
2
total used free shared buff/cache available
Mem: 7932 1628 2851 80 3848 6304
Swap: 3071 58 3013
28.0.4
Docker Compose version v2.38.2