Update submodule for txservice#296
Conversation
WalkthroughAdded a local flag Changes
Sequence Diagram(s)sequenceDiagram
participant ERU as EloqRecoveryUnit
participant TX as txservice::BatchReadTxRequest
rect rgb(240,250,240)
note right of ERU: batchGetKV builds request\nwith explicit flag (default false)
ERU->>TX: BatchReadTxRequest(..., point_read_on_miss=false)
TX-->>ERU: constructed request
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/mongo/db/modules/eloq/src/eloq_recovery_unit.cpp (1)
468-470: Verify the hardcoded default value.The
point_read_on_missflag is hardcoded tofalse, which likely maintains the previous behavior before this parameter was introduced. Please confirm this is the intended default for all batch read operations.Additionally, consider making the variable
constsince it's never modified:bool isForShare = false; bool readLocal = false; - bool point_read_on_miss = false; + const bool point_read_on_miss = false;
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/mongo/db/modules/eloq/src/eloq_recovery_unit.cpp(2 hunks)src/mongo/db/modules/eloq/tx_service(1 hunks)
🔇 Additional comments (2)
src/mongo/db/modules/eloq/tx_service (1)
1-1: Submodule update is properly coordinated and verified.Verification confirms all call sites have been updated consistently:
- Single
BatchReadTxRequestinstantiation at line 471 ofeloq_recovery_unit.cpp- New
point_read_on_missparameter is correctly passed as the final argument- No lingering references to the old constructor signature exist
The submodule pointer update is safe to proceed.
src/mongo/db/modules/eloq/src/eloq_recovery_unit.cpp (1)
471-480: LGTM!The
BatchReadTxRequestconstructor call correctly includes the newpoint_read_on_missparameter, properly adapting to the updated txservice API.
32e852b to
23fe64d
Compare
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
src/mongo/db/modules/eloq/src/eloq_recovery_unit.cpp (2)
470-470: Consider using camelCase for consistency.The variable
point_read_on_missuses snake_case, while other boolean variables in the same scope use camelCase (isForWrite,isForShare,readLocal). Consider renaming topointReadOnMissfor consistency with the existing code style.
471-480: LGTM with optional suggestions.The addition of the
point_read_on_missparameter aligns with the submodule update. The hardcodedfalsevalue is consistent with the existing pattern forisForShareandreadLocal.Optional improvements for future consideration:
- Add a comment explaining what
point_read_on_misscontrols and why it's currently disabled- If this feature will be configurable later, consider making it a parameter or reading from configuration settings
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/mongo/db/modules/eloq/src/eloq_recovery_unit.cpp(2 hunks)src/mongo/db/modules/eloq/tx_service(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- src/mongo/db/modules/eloq/tx_service
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/mongo/transport/service_state_machine.cpp (1)
282-306: Remove the deadreset()method from ServiceStateMachine.The method is not called anywhere in the active codebase. The only reference to
ServiceStateMachine::reset()exists in the commented-out object pooling code (line 238), confirming that with the removal of object pooling, this method serves no purpose and should be deleted.
🧹 Nitpick comments (1)
src/mongo/transport/service_state_machine.cpp (1)
233-245: Remove commented-out code.The commented-out pooling implementation should be removed entirely rather than left in the codebase. If this code needs to be referenced in the future, it's available in version control history.
Apply this diff to remove the dead code:
- // ServiceStateMachine* ssm{nullptr}; - // std::unique_ptr<ServiceStateMachine> ssmUptr{nullptr}; - // bool success = ssmPool.try_dequeue(ssmUptr); - // if (success) { - // ssm = ssmUptr.release(); - // ssm->Reset(svcContext, std::move(session), transportMode); - // } else { - // ssm = new ServiceStateMachine(svcContext, std::move(session), transportMode, group_id); - // } - // return std::shared_ptr<ServiceStateMachine>(ssm, [](ServiceStateMachine* ptr) { - // ssmPool.enqueue(std::unique_ptr<ServiceStateMachine>(ptr)); - // });
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/mongo/base/object_pool.h(0 hunks)src/mongo/transport/service_state_machine.cpp(1 hunks)
💤 Files with no reviewable changes (1)
- src/mongo/base/object_pool.h
🔇 Additional comments (1)
src/mongo/transport/service_state_machine.cpp (1)
230-232: Verified: Change is complete and correct; performance trade-off is intentional.The transition from thread-local pooling to direct
std::make_sharedallocation is complete and properly documented. No active pooling code remains, and the design rationale is explicitly stated in the comments: the thread-local pool design conflicts with shared_ptr ownership semantics. The performance overhead from eliminating pooling is an accepted trade-off for correctness and simplified ownership model.
30670eb to
bc0498f
Compare
bc0498f to
959d587
Compare
eloqdata/tx_service#195
Summary by CodeRabbit