Files
qdrant-cloud-bot d75d805533 Strict mode: add max_disk_usage_percent (#9212)
* Strict mode: add `max_disk_usage_percent`

Mirrors `max_resident_memory_percent`: rejects disk-consuming update ops
(upsert, set/overwrite payload, update vectors) when the filesystem hosting
Qdrant storage is filled above the configured percentage. Delete-style ops
remain allowed so callers can free disk.

Disk usage is sampled via `statvfs` and TTL-cached for 5s (same cadence as
the resident-memory reader) so high-RPS request paths don't hammer the
syscall. Reader is keyed by path in `common::disk_usage` and returns `None`
on stat failure — callers (the strict-mode check) treat `None` as "skip",
matching the memory-check behaviour.

Plumbing follows the existing pattern: field on `StrictModeConfig` (+
output/diff/Hash), gRPC proto field `22`, validation 1..=100, REST/proto
conversions, and the hook into `check_strict_mode_toc_batch` alongside the
memory check (both guarded by `any_consumes_memory`).

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix CI: Windows disk_usage test + e2e WAL config

- `missing_path_returns_none` panicked on Windows because
  `GetDiskFreeSpaceEx` succeeds for non-existent paths (it resolves up to
  the containing drive). Relax the assertion to "must not panic; if a
  value is returned it must be well-formed". The contract we care about
  (None on failure) is platform-defined, not something we can portably
  force.

- e2e test failed at batch 0 with "WAL buffer size exceeds available disk
  space": Qdrant's existing per-shard `DiskUsageWatcher` enforces
  `free >= 2 * wal_capacity_mb` and the default WAL didn't fit in the
  50 MB tmpfs. Bump tmpfs to 200 MB and shrink `wal_capacity_mb` to 1 MB
  (same pattern as `test_low_disk.py`) so our strict-mode gate is the
  one that fires, not the WAL pre-check. Raise the gate threshold to
  50% to match the larger headroom.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-03 14:54:03 +02:00
..
2022-02-03 11:35:26 +01:00
2022-02-16 11:35:37 +01:00
2022-03-03 23:58:13 +01:00
2022-06-08 12:47:10 +02:00
2022-06-16 15:30:46 +02:00
2022-06-24 13:14:48 +02:00
2022-06-28 11:51:29 +02:00
2022-07-05 11:13:03 +02:00
2022-07-25 20:05:07 +02:00
2022-07-26 19:28:53 +02:00
2022-08-08 11:13:54 +02:00
2022-08-10 21:15:40 +02:00
2022-09-19 10:05:57 +02:00
2022-09-19 15:31:35 +02:00
2022-09-30 11:08:16 +02:00
2022-10-13 09:14:11 +02:00
2022-10-13 09:14:11 +02:00
2022-10-18 10:49:43 +02:00
2022-10-26 10:40:02 +02:00
2022-11-04 23:10:13 +01:00
2022-11-09 14:03:49 +01:00
2022-11-15 16:12:21 +01:00
2022-11-25 14:53:22 +01:00
2022-12-06 17:59:55 +01:00
2023-01-13 16:03:56 +01:00
2023-02-08 14:00:55 +01:00
2023-02-21 18:36:21 +01:00
2023-03-05 21:11:40 +01:00
2023-03-17 17:33:49 +01:00
2023-04-11 19:36:46 +02:00
2023-04-27 19:24:37 +02:00
2023-05-06 19:40:50 +02:00
2023-05-23 18:16:59 +02:00
2023-06-23 13:24:23 +02:00
2023-08-02 22:59:21 +02:00
2023-09-06 11:33:39 +02:00
2023-10-09 14:46:46 +02:00
2023-12-08 01:46:36 +01:00
2024-04-22 11:58:32 +02:00
2024-07-01 19:51:35 +02:00
2024-08-12 16:29:32 +02:00
2024-10-08 14:33:47 +02:00
2025-01-16 15:06:38 +01:00
2025-04-21 12:17:44 +02:00
2025-07-18 11:06:11 +02:00
2025-11-17 12:10:37 +01:00
2026-02-19 13:35:11 +01:00
2026-05-08 17:26:56 +02:00
2022-02-07 07:59:09 +01:00
2026-05-08 17:26:56 +02:00