Conversation
|
Caution Review failedThe pull request is closed. WalkthroughEloq KV engine now creates mutable local copies for host-manager parameters, fills defaults (IP, port, binary path) when missing, and always passes the finalized hmIP/hmPort/hmBinPath when starting the tx/datastore service; global options ensure Changes
Sequence Diagram(s)sequenceDiagram
participant C as EloqKVEngine
participant R as LocalAddressResolver
participant S as Tx/DataStoreService
participant Fork as ForkDecision
participant HM as HostManagerProcess
rect rgba(220,235,255,0.45)
C->>R: resolve local host/port
R-->>C: localHost, localPort
note right of C: create mutable copies: hmIP, hmBinPath
C->>C: if hmIP=="" -> hmIP = localHost
C->>C: if hmPort==0 -> hmPort = localPort + 4
C->>C: if hmBinPath=="" -> derive binary path
end
rect rgba(230,255,230,0.35)
C->>S: startTxService(&hmIP, &hmPort, &hmBinPath)
S-->>C: service started
end
C->>Fork: evaluate FORK_HM_PROCESS
alt fork enabled
Fork->>HM: fork & exec host manager with hmIP,hmPort,hmBinPath
HM-->>C: PID/status
else no fork
Fork-->>C: skip host-manager
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (1 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
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: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/mongo/db/modules/eloq/src/eloq_kv_engine.cpp(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
src/mongo/db/modules/eloq/src/eloq_kv_engine.cpp (1)
src/mongo/db/server_options.h (1)
bootstrap(86-269)
🔇 Additional comments (1)
src/mongo/db/modules/eloq/src/eloq_kv_engine.cpp (1)
324-324: Early initialization of initDataStoreService() is safe and has no ordering dependencies.Verification confirms that all variables accessed by
initDataStoreService()(eloqGlobalOptions members, serverGlobalParams.bootstrap, _catalogFactory, _dbPath) are initialized before line 324. The method does not depend on any state initialized after it (ngConfigs, forkHostManager, node IDs, host manager addresses), so the early call introduces no ordering issues.
03dec79 to
11d6516
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/mongo/db/modules/eloq/src/eloq_global_options.cpp(1 hunks)src/mongo/db/modules/eloq/src/eloq_kv_engine.cpp(2 hunks)
🔇 Additional comments (3)
src/mongo/db/modules/eloq/src/eloq_global_options.cpp (1)
716-718: Good defensive initialization.Ensuring
hostManagerAddris always assigned prevents undefined behavior downstream. The ("", 0) sentinel value clearly signals "no host manager configured" for consumption by the KV engine initialization logic.src/mongo/db/modules/eloq/src/eloq_kv_engine.cpp (2)
320-323: LGTM: Const reference issue resolved.Changing from const references to mutable copies correctly addresses the past review feedback and enables the defaulting logic applied at lines 330-336.
567-569: Consistent parameter passing approach.Always passing host-manager addresses (rather than conditional nullptrs) aligns with the initialization guarantees from
eloq_global_options.cpp. This approach simplifies theStart()interface by eliminating null-pointer checks.
11d6516 to
754bbcd
Compare
754bbcd to
e895af3
Compare
Summary by CodeRabbit
Bug Fixes
Chores