WBM policy changes (#15047) - #15047
Open
rban1 wants to merge 1 commit into
Open
Conversation
|
@rban1 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D112396106. |
|
| Check | Count |
|---|---|
modernize-make-shared |
3 |
| Total | 3 |
Details
db/db_write_buffer_manager_test.cc (3 warning(s))
db/db_write_buffer_manager_test.cc:862:32: warning: use std::make_shared instead [modernize-make-shared]
db/db_write_buffer_manager_test.cc:958:32: warning: use std::make_shared instead [modernize-make-shared]
db/db_write_buffer_manager_test.cc:1005:32: warning: use std::make_shared instead [modernize-make-shared]
rban1
pushed a commit
to rban1/rocksdb
that referenced
this pull request
Aug 5, 2026
Summary: Pull Request resolved: facebook#15047 Differential Revision: D112396106
rban1
force-pushed
the
export-D112396106
branch
from
August 5, 2026 16:25
9d4cff4 to
bce48da
Compare
✅ Claude Code ReviewAuto-triggered after CI passed — reviewing commit bce48da SummaryWell-structured PR adding two new WriteBufferManager flush policies. Lock ordering, shutdown sequencing, and background job lifecycle are handled correctly. The core design of a FlushInitiator registry for cross-DB coordination is sound. High-severity findings (2):
Full review (click to expand)Findings🔴 HIGHH1.
|
| Context | Assumptions hold? | Action needed? |
|---|---|---|
| ReadOnly DB | YES -- returns 0 from GetFlushableMemUsage | Safe |
| atomic_flush | YES -- returns 0, ScheduleWBMFlush bails out | Safe |
| WritePreparedTxnDB | YES -- CF selection orthogonal to txn | Safe |
| MemPurge | YES -- FlushMemTable handles internally | Safe |
| FIFO/Universal | YES -- compaction style irrelevant | Safe |
| User-defined timestamps | YES -- orthogonal | Safe |
| allow_concurrent_memtable_write | YES -- reads under mutex_ | Safe |
Positive Observations
- Lock ordering is well-designed:
flush_initiators_mu_->mutex_consistently followed. No deadlock risk. - Coalescing is effective: One outstanding WBM flush per DB prevents thundering herd.
- Shutdown sequence is correct: Deregistration before teardown, wait loop includes
bg_wbm_flush_scheduled_. - UnSchedule tag compatibility:
thistag means existing CloseHelper UnSchedule covers WBM tasks. - CFD lifetime management: Correct Ref/Unref across mutex release in BackgroundCallWBMFlush.
ℹ️ 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
Summary: Pull Request resolved: facebook#15047 Differential Revision: D112396106
rban1
force-pushed
the
export-D112396106
branch
from
August 12, 2026 20:51
bce48da to
86dd51d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary: Pull Request resolved: #15047
Differential Revision: D112396106