Apply completed lab 4 implementation

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
HellsTomato
2026-10-31 00:38:42 +03:00
co-authored by Copilot
parent ec540a1a72
commit 3ed3ce07cf
31 changed files with 3558 additions and 17 deletions
+300
View File
@@ -0,0 +1,300 @@
{
"experiment": "reconciler fault injection (track 2)",
"grace_seconds": 90,
"injected": {
"orphan_objects_old": 3,
"object_without_row": 1,
"orphan_object_fresh": 1,
"stale_upload_with_object": 1,
"stale_upload_without_object": 1,
"upload_in_progress": 1,
"missing_object_used": 1,
"missing_object_unreferenced": 1,
"size_mismatch": 1,
"checksum_mismatch": 1,
"false_lost": 1
},
"state_before": {
"rows": [
"lost:1",
"ready:7",
"uploading:3"
],
"objects": 12
},
"state_after_dry_run": {
"rows": [
"lost:1",
"ready:7",
"uploading:3"
],
"objects": 12
},
"dry_run": {
"mode": "dry-run",
"grace_seconds": 90,
"verify_checksums": false,
"duration_ms": 671,
"cost": {
"s3_list_requests": 1,
"s3_objects": 12,
"db_queries": 1,
"db_rows": 11,
"s3_head_requests": 2
},
"findings": {
"size_mismatch": 1,
"orphan_object": 4,
"orphan_object_fresh_kept": 1,
"stale_upload_with_object": 1,
"missing_object_used": 1,
"upload_in_progress_kept": 1,
"lost_object_back_unverified": 1,
"missing_object": 1,
"stale_upload": 1
},
"actions": {},
"details": [
{
"kind": "size_mismatch",
"key": "originals/0836f158-90ec-46a7-86c1-1dc2ee443c36",
"attachment_id": "0836f158-90ec-46a7-86c1-1dc2ee443c36"
},
{
"kind": "orphan_object",
"key": "originals/3a27e460-a35f-4cd5-adcb-cef04b952caa"
},
{
"kind": "orphan_object",
"key": "originals/676da6c0-1670-40f1-966e-5177f90382a9"
},
{
"kind": "stale_upload_with_object",
"key": "originals/6c3a748b-23d3-4911-8a22-e912935726d1",
"attachment_id": "6c3a748b-23d3-4911-8a22-e912935726d1"
},
{
"kind": "missing_object",
"key": "originals/79e49f97-9d5a-427c-806e-27e92706983e",
"attachment_id": "79e49f97-9d5a-427c-806e-27e92706983e"
},
{
"kind": "orphan_object",
"key": "originals/dd2e6a38-071e-46ca-9ccc-f37e3fdbc9f8"
},
{
"kind": "orphan_object",
"key": "originals/e332f279-138e-4e26-8ed9-c198ca6f0868"
},
{
"kind": "missing_object",
"key": "originals/ecdee330-3a4b-4b07-8b74-121871b098cd",
"attachment_id": "ecdee330-3a4b-4b07-8b74-121871b098cd"
},
{
"kind": "stale_upload",
"key": "originals/f957c914-3f81-4212-a39e-3885c019674a",
"attachment_id": "f957c914-3f81-4212-a39e-3885c019674a"
}
]
},
"apply": {
"mode": "apply",
"grace_seconds": 90,
"verify_checksums": false,
"duration_ms": 580,
"cost": {
"s3_list_requests": 1,
"s3_objects": 12,
"db_queries": 10,
"db_rows": 11,
"s3_delete_requests": 5,
"s3_head_requests": 2
},
"findings": {
"size_mismatch": 1,
"orphan_object": 4,
"orphan_object_fresh_kept": 1,
"stale_upload_with_object": 1,
"missing_object_used": 1,
"upload_in_progress_kept": 1,
"lost_object_back_unverified": 1,
"missing_object": 1,
"stale_upload": 1
},
"actions": {
"marked_lost": 3,
"objects_deleted": 5,
"rows_deleted": 2
},
"details": [
{
"kind": "size_mismatch",
"key": "originals/0836f158-90ec-46a7-86c1-1dc2ee443c36",
"attachment_id": "0836f158-90ec-46a7-86c1-1dc2ee443c36"
},
{
"kind": "orphan_object",
"key": "originals/3a27e460-a35f-4cd5-adcb-cef04b952caa"
},
{
"kind": "orphan_object",
"key": "originals/676da6c0-1670-40f1-966e-5177f90382a9"
},
{
"kind": "stale_upload_with_object",
"key": "originals/6c3a748b-23d3-4911-8a22-e912935726d1",
"attachment_id": "6c3a748b-23d3-4911-8a22-e912935726d1"
},
{
"kind": "missing_object",
"key": "originals/79e49f97-9d5a-427c-806e-27e92706983e",
"attachment_id": "79e49f97-9d5a-427c-806e-27e92706983e"
},
{
"kind": "orphan_object",
"key": "originals/dd2e6a38-071e-46ca-9ccc-f37e3fdbc9f8"
},
{
"kind": "orphan_object",
"key": "originals/e332f279-138e-4e26-8ed9-c198ca6f0868"
},
{
"kind": "missing_object",
"key": "originals/ecdee330-3a4b-4b07-8b74-121871b098cd",
"attachment_id": "ecdee330-3a4b-4b07-8b74-121871b098cd"
},
{
"kind": "stale_upload",
"key": "originals/f957c914-3f81-4212-a39e-3885c019674a",
"attachment_id": "f957c914-3f81-4212-a39e-3885c019674a"
}
]
},
"apply_again": {
"mode": "apply",
"grace_seconds": 90,
"verify_checksums": false,
"duration_ms": 395,
"cost": {
"s3_list_requests": 1,
"s3_objects": 7,
"db_queries": 1,
"db_rows": 9
},
"findings": {
"lost_known": 3,
"orphan_object_fresh_kept": 1,
"upload_in_progress_kept": 1,
"lost_object_back_unverified": 1
},
"actions": {},
"details": []
},
"verify_checksums": {
"mode": "apply",
"grace_seconds": 90,
"verify_checksums": true,
"duration_ms": 680,
"cost": {
"s3_list_requests": 1,
"s3_objects": 7,
"db_queries": 3,
"db_rows": 9,
"s3_get_requests": 4,
"bytes_read": 447268
},
"findings": {
"lost_known": 3,
"checksum_mismatch": 1,
"orphan_object_fresh_kept": 1,
"upload_in_progress_kept": 1,
"lost_object_back": 1
},
"actions": {
"marked_lost": 1,
"restored": 1
},
"details": [
{
"kind": "checksum_mismatch",
"key": "originals/4f742657-3624-4fb6-af3b-6e5b8fad28d9",
"attachment_id": "4f742657-3624-4fb6-af3b-6e5b8fad28d9"
},
{
"kind": "lost_object_back",
"key": "originals/c5e10e84-7b30-4c28-9f53-16a31a14dc45",
"attachment_id": "c5e10e84-7b30-4c28-9f53-16a31a14dc45"
}
]
},
"verify_again": {
"mode": "apply",
"grace_seconds": 90,
"verify_checksums": true,
"duration_ms": 711,
"cost": {
"s3_list_requests": 1,
"s3_objects": 7,
"db_queries": 1,
"db_rows": 9,
"s3_get_requests": 3,
"bytes_read": 335451
},
"findings": {
"lost_known": 4,
"orphan_object_fresh_kept": 1,
"upload_in_progress_kept": 1
},
"actions": {},
"details": []
},
"state_after": {
"rows": [
"lost:4",
"ready:9995",
"uploading:1"
],
"objects": 1000
},
"cost": [
{
"rows": 1000,
"dry_run": {
"duration_ms": 996,
"s3_list_requests": 1,
"s3_objects": 998,
"db_queries": 2,
"db_rows": 1000
},
"verify_checksums": {
"duration_ms": 18881,
"s3_list_requests": 1,
"s3_objects": 998,
"db_queries": 2,
"db_rows": 1000,
"s3_get_requests": 996,
"bytes_read": 627464
}
},
{
"rows": 10000,
"dry_run": {
"duration_ms": 5290,
"s3_list_requests": 10,
"s3_objects": 9998,
"db_queries": 11,
"db_rows": 10000
},
"verify_checksums": {
"duration_ms": 87638,
"s3_list_requests": 10,
"s3_objects": 9998,
"db_queries": 11,
"db_rows": 10000,
"s3_get_requests": 9996,
"bytes_read": 1248464
}
}
]
}
+124
View File
@@ -0,0 +1,124 @@
{
"experiment": "concurrent ~10 MiB PNG uploads through nginx",
"api_memory_limit": "512M per replica, JVM heap max 128 MiB",
"max_concurrent_uploads_per_replica": 8,
"results": [
{
"concurrent_uploads": 1,
"file_mib": 9.79,
"statuses": {
"201": 1
},
"replicas_used": 1,
"wall_seconds": 1.07,
"latency_seconds": {
"p50": 1.04,
"max": 1.04
},
"memory": {
"api-1": {
"baseline_current_mib": 244.1,
"baseline_anon_mib": 194.6,
"peak_current_mib": 263.3,
"peak_anon_mib": 205.0
},
"api-2": {
"baseline_current_mib": 197.1,
"baseline_anon_mib": 196.2,
"peak_current_mib": 197.6,
"peak_anon_mib": 196.3
},
"nginx": {
"baseline_current_mib": 10.0,
"baseline_anon_mib": 8.0,
"peak_current_mib": 20.6,
"peak_anon_mib": 8.1
},
"s3": {
"baseline_current_mib": 127.2,
"baseline_anon_mib": 84.2,
"peak_current_mib": 182.6,
"peak_anon_mib": 128.3
}
}
},
{
"concurrent_uploads": 10,
"file_mib": 9.79,
"statuses": {
"201": 10
},
"replicas_used": 2,
"wall_seconds": 4.97,
"latency_seconds": {
"p50": 4.9,
"max": 4.94
},
"memory": {
"api-1": {
"baseline_current_mib": 254.8,
"baseline_anon_mib": 205.1,
"peak_current_mib": 262.6,
"peak_anon_mib": 209.2
},
"api-2": {
"baseline_current_mib": 197.8,
"baseline_anon_mib": 196.5,
"peak_current_mib": 265.5,
"peak_anon_mib": 212.0
},
"nginx": {
"baseline_current_mib": 10.9,
"baseline_anon_mib": 8.2,
"peak_current_mib": 108.2,
"peak_anon_mib": 8.5
},
"s3": {
"baseline_current_mib": 138.7,
"baseline_anon_mib": 84.8,
"peak_current_mib": 373.8,
"peak_anon_mib": 239.0
}
}
},
{
"concurrent_uploads": 20,
"file_mib": 9.79,
"statuses": {
"201": 20
},
"replicas_used": 2,
"wall_seconds": 11.34,
"latency_seconds": {
"p50": 10.42,
"max": 11.3
},
"memory": {
"api-1": {
"baseline_current_mib": 214.3,
"baseline_anon_mib": 209.2,
"peak_current_mib": 297.7,
"peak_anon_mib": 214.7
},
"api-2": {
"baseline_current_mib": 217.9,
"baseline_anon_mib": 212.1,
"peak_current_mib": 300.5,
"peak_anon_mib": 219.3
},
"nginx": {
"baseline_current_mib": 9.8,
"baseline_anon_mib": 8.4,
"peak_current_mib": 127.9,
"peak_anon_mib": 8.8
},
"s3": {
"baseline_current_mib": 242.3,
"baseline_anon_mib": 96.8,
"peak_current_mib": 512.0,
"peak_anon_mib": 430.0
}
}
}
]
}
@@ -0,0 +1,124 @@
{
"experiment": "concurrent ~10 MiB PNG uploads through nginx",
"api_memory_limit": "512M per replica, JVM heap max 128 MiB",
"max_concurrent_uploads_per_replica": 8,
"results": [
{
"concurrent_uploads": 1,
"file_mib": 9.79,
"statuses": {
"201": 1
},
"replicas_used": 1,
"wall_seconds": 0.56,
"latency_seconds": {
"p50": 0.55,
"max": 0.55
},
"memory": {
"api-1": {
"baseline_current_mib": 229.4,
"baseline_anon_mib": 228.3,
"peak_current_mib": 229.9,
"peak_anon_mib": 228.3
},
"api-2": {
"baseline_current_mib": 226.6,
"baseline_anon_mib": 210.4,
"peak_current_mib": 249.1,
"peak_anon_mib": 213.4
},
"nginx": {
"baseline_current_mib": 12.9,
"baseline_anon_mib": 8.3,
"peak_current_mib": 22.3,
"peak_anon_mib": 8.3
},
"s3": {
"baseline_current_mib": 147.2,
"baseline_anon_mib": 139.2,
"peak_current_mib": 253.5,
"peak_anon_mib": 178.8
}
}
},
{
"concurrent_uploads": 10,
"file_mib": 9.79,
"statuses": {
"201": 10
},
"replicas_used": 2,
"wall_seconds": 4.53,
"latency_seconds": {
"p50": 4.27,
"max": 4.52
},
"memory": {
"api-1": {
"baseline_current_mib": 229.9,
"baseline_anon_mib": 228.6,
"peak_current_mib": 281.5,
"peak_anon_mib": 231.3
},
"api-2": {
"baseline_current_mib": 240.0,
"baseline_anon_mib": 213.7,
"peak_current_mib": 292.8,
"peak_anon_mib": 217.0
},
"nginx": {
"baseline_current_mib": 12.9,
"baseline_anon_mib": 8.5,
"peak_current_mib": 111.2,
"peak_anon_mib": 8.7
},
"s3": {
"baseline_current_mib": 253.3,
"baseline_anon_mib": 178.9,
"peak_current_mib": 512.0,
"peak_anon_mib": 507.0
}
}
},
{
"concurrent_uploads": 20,
"file_mib": 9.79,
"statuses": {
"201": 20
},
"replicas_used": 2,
"wall_seconds": 11.85,
"latency_seconds": {
"p50": 10.9,
"max": 11.82
},
"memory": {
"api-1": {
"baseline_current_mib": 232.2,
"baseline_anon_mib": 231.4,
"peak_current_mib": 314.0,
"peak_anon_mib": 234.2
},
"api-2": {
"baseline_current_mib": 244.3,
"baseline_anon_mib": 217.2,
"peak_current_mib": 326.4,
"peak_anon_mib": 221.7
},
"nginx": {
"baseline_current_mib": 12.8,
"baseline_anon_mib": 8.6,
"peak_current_mib": 128.0,
"peak_anon_mib": 9.1
},
"s3": {
"baseline_current_mib": 509.1,
"baseline_anon_mib": 346.5,
"peak_current_mib": 512.0,
"peak_anon_mib": 502.2
}
}
}
]
}