]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
RGW: add delay injection options for integration testing
authorOguzhan Ozmen <oozmen@bloomberg.net>
Sun, 9 Nov 2025 00:59:56 +0000 (00:59 +0000)
committerOguzhan Ozmen <oozmen@bloomberg.net>
Thu, 19 Mar 2026 19:57:11 +0000 (19:57 +0000)
Introduce two developer-level configuration options for controlled delay
injection during integration testing:

  - rgw_inject_delay_sec: duration of the injected delay (in seconds)
  - rgw_inject_delay_pattern: pattern to select which delay points are
    activated

These options help reproduce timing-sensitive or race conditions in a
deterministic way during RGW integration tests.

In the future, these options may evolve to support more complex timing
scenarios by using list or map types. This would allow multiple delay
injection points to be configured simultaneously, for example: delaying
pattern A by 5 seconds, pattern B before or after a specific event, or
using different durations for each point.

Signed-off-by: Oguzhan Ozmen <oozmen@bloomberg.net>
(cherry picked from commit 98276d90cd88da085ed3b829832c09f8901fa8d8)

src/common/options/rgw.yaml.in

index ec7e6fbbb9f5624c35d9d88094b87119e84c0e86..90ea9f156521facabea47e49c93ba2896866c793 100644 (file)
@@ -2672,6 +2672,36 @@ options:
   services:
   - rgw
   with_legacy: true
+- name: rgw_inject_delay_sec
+  type: float
+  level: dev
+  desc: delay duration in seconds for test injection points
+  long_desc: Intended for integration and stress testing. When set to a positive
+    value, this option introduces an artificial delay at specific code paths to
+    help deterministically reproduce timing-sensitive scenarios. It is used in
+    conjunction with `rgw_inject_delay_pattern` to control which delay points
+    are activated.
+  default: 0
+  services:
+  - rgw
+  see_also:
+  - rgw_inject_delay_pattern
+  with_legacy: true
+- name: rgw_inject_delay_pattern
+  type: str
+  level: dev
+  desc: select which delay injection points are activated
+  long_desc: Used together with `rgw_inject_delay_sec` to target specific delay
+    injection points within the RGW code. The pattern should match a string
+    associated with one or more delay locations (e.g., "delay_bucket_full_sync_loop")
+    to activate them during testing.
+  services:
+  - rgw
+  flags:
+  - runtime
+  see_also:
+  - rgw_inject_delay_sec
+  with_legacy: true
 - name: rgw_sync_trace_history_size
   type: size
   level: advanced