Add listener_uri stress test flag for pluggable EventListener#14741
Add listener_uri stress test flag for pluggable EventListener#14741hx235 wants to merge 1 commit into
Conversation
Summary: Adds a --listener_uri gflag to db_stress that creates an EventListener via ObjectLibrary from the given URI and attaches it to the DB options. This is the upstream repo change in internal_repo_rocksdb: the gflag declaration, definition, and the ObjectRegistry lookup in Open(). Differential Revision: D104750476
|
@hx235 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D104750476. |
|
| Check | Count |
|---|---|
concurrency-mt-unsafe |
1 |
| Total | 1 |
Details
db_stress_tool/db_stress_test_base.cc (1 warning(s))
db_stress_tool/db_stress_test_base.cc:3973:9: warning: function is not thread safe [concurrency-mt-unsafe]
exit(1) is widely used in db stress test |
🟡 Codex Code ReviewAuto-triggered after CI passed — reviewing commit 52029eb ❌ Codex review failed before producing findings. ℹ️ About this responseGenerated by Codex CLI. Limitations:
Commands:
|
✅ Claude Code ReviewAuto-triggered after CI passed — reviewing commit 52029eb SummarySmall, low-risk change adding a High-severity findings (0): No high-severity findings. Full review (click to expand)Findings🔴 HIGHNone. 🟡 MEDIUMM1. Should use
|
| Context | Affected? | Assessment |
|---|---|---|
| DB reopen | Yes | Safe — options_.listeners.clear() at line 3960 rebuilds the list each time |
| Fault injection during Open | No | Listener is added before fault injection setup; no interaction |
| ReadOnly DB | Yes | Safe — listeners are added to options regardless of open mode |
| Transaction DB | Yes | Safe — listener is added before the txn/non-txn open branch |
| Multi-ops txn stress | Yes | Safe — RegisterAdditionalListeners() runs first, URI listener appends after |
Positive Observations
- Correct lifecycle management: listener is added to
options_.listenersbeforeDB::Open(), and the vector is cleared and rebuilt on each reopen. - Proper error handling with
exit(1), consistent with other db_stress flag validation. - The
ObjectRegistry::NewSharedObjectAPI guarantees a non-null shared_ptr onStatus::OK(), so the current code is safe from null pointer issues (though switching toCreateFromStringwould need a null check). - Flag naming (
listener_uri) and description follow established conventions (env_uri,fs_uri,secondary_cache_uri).
ℹ️ About this response
Generated by Claude Code.
Review methodology: claude_md/code_review.md
Limitations:
- Claude may miss context from files not in the diff
- Large PRs may be truncated
- Always apply human judgment to AI suggestions
Commands:
/claude-review [context]— Request a code review/claude-query <question>— Ask about the PR or codebase
|
@hx235 has imported this pull request. If you are a Meta employee, you can view this in D104750476. |
Summary:
Adds a --listener_uri flag to db_stress that creates an EventListener via ObjectLibrary from the given URI and attaches it to the DB options.
Test: