Add engine type prefix to kv_table_name#206
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughAdded an explicit table-engine parameter ( Changes
Sequence Diagram(s)(Skipped — changes are parameter additions to existing calls and do not introduce a new multi-component sequential flow that requires visualization.) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
✏️ Tip: You can disable this entire section by setting 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
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
storage/eloq/ha_eloq.cc (1)
1027-1046: Strengthen name format validation; the "./" prefix check will skip engine-prefixed table names.The
full_name_sv.substr(0, 2) == "./"gate (line 1030–1031) assumes all discovered table names have this exact format. IfDiscoverAllTableNamesbegins returning engine-prefixed names, these tables will be silently skipped. Themonokey_to_marianamehelper also hard-codes "./" prefix handling and cannot parse alternative formats. Consider using or enhancing a shared parser that handles multiple name formats robustly, or add explicit validation/normalization of discovered names before processing.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
data_substratestorage/eloq/eloq_db.cppstorage/eloq/eloq_i_s.ccstorage/eloq/ha_eloq.cc
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: githubzilla
Repo: eloqdata/eloqsql PR: 154
File: storage/eloq/ha_eloq.cc:2770-2781
Timestamp: 2025-11-07T05:12:43.208Z
Learning: In eloqdata/eloqsql, storage/eloq/ha_eloq.cc (KV_ELOQDS path): for DATA_STORE_TYPE_ELOQDSS_ROCKSDB (local RocksDB), each eloqsql instance owns its own RocksDB instance, and passing create_if_missing=true to DataStoreService::StartService is intentional and safe.
Learnt from: githubzilla
Repo: eloqdata/eloqsql PR: 127
File: storage/eloq/build_log_service.cmake:97-124
Timestamp: 2025-09-25T11:41:40.111Z
Learning: The `storage/eloq/build_log_service.cmake` file is specifically for the open log service build and only supports ROCKSDB as its log state backend. Unlike the enterprise version in `build_eloq_log_service.cmake`, it does not need to handle cloud-specific variants like ROCKSDB_CLOUD_S3 or ROCKSDB_CLOUD_GCS.
📚 Learning: 2025-11-07T05:12:43.208Z
Learnt from: githubzilla
Repo: eloqdata/eloqsql PR: 154
File: storage/eloq/ha_eloq.cc:2770-2781
Timestamp: 2025-11-07T05:12:43.208Z
Learning: In eloqdata/eloqsql, storage/eloq/ha_eloq.cc (KV_ELOQDS path): for DATA_STORE_TYPE_ELOQDSS_ROCKSDB (local RocksDB), each eloqsql instance owns its own RocksDB instance, and passing create_if_missing=true to DataStoreService::StartService is intentional and safe.
Applied to files:
storage/eloq/eloq_db.cppstorage/eloq/eloq_i_s.ccstorage/eloq/ha_eloq.cc
📚 Learning: 2025-11-07T07:10:40.633Z
Learnt from: githubzilla
Repo: eloqdata/eloqsql PR: 154
File: storage/eloq/ha_eloq.cc:2571-2623
Timestamp: 2025-11-07T07:10:40.633Z
Learning: Repo: eloqdata/eloqsql PR: 154
File/Area: storage/eloq/ha_eloq.cc (eloq_init_func cluster membership resolution)
Learning: In this repo’s ng_config, the local node is guaranteed to be a candidate (NodeConfig::is_candidate_ == true). Therefore, assigning native_ng_id only when is_candidate_ is true is acceptable; the key improvement is to break early from both loops once the local node is found.
Applied to files:
storage/eloq/eloq_i_s.ccstorage/eloq/ha_eloq.cc
🔇 Additional comments (5)
data_substrate (1)
1-1: The submodule update is properly aligned with the dependent code. All API calls in storage/eloq/eloq_db.cpp, storage/eloq/eloq_i_s.cc, and storage/eloq/ha_eloq.cc consistently usetxservice::TableEngine::EloqSqlas the first parameter for UpsertDatabase, DropDatabase, FetchDatabase, FetchAllDatabase, and DiscoverAllTableNames. No inconsistencies or breaking changes detected.storage/eloq/eloq_db.cpp (1)
399-401: Good, consistent engine scoping for DB metadata ops.All updated
storage_hdcalls now passtxservice::TableEngine::EloqSqluniformly, which should prevent cross-engine key collisions as intended. Consider extracting a localconstexpr auto kEngine = txservice::TableEngine::EloqSql;to reduce repetition (optional).Also applies to: 443-445, 469-470, 492-493, 519-520, 545-546, 571-572
storage/eloq/eloq_i_s.cc (1)
67-68: VerifyDiscoverAllTableNamesoutput format doesn’t breakis_tmp_table()/basename().Given the PR goal (“engine type prefix to kv_table_name”), please confirm that
table_namesreturned here are still in the expected string format foris_tmp_table()andbasename()(or update those helpers accordingly).storage/eloq/ha_eloq.cc (2)
6650-6652: Good:FetchDatabasenow scoped by engine.Passing
txservice::TableEngine::EloqSqlhere matches the rest of the storage API updates and should keep DB existence checks consistent with the engine’s namespace.
821-835: Confirm both overloads ofDiscoverAllTableNamesexist in tx_service after recent submodule update.This file calls
DiscoverAllTableNameswith two different signatures (2-arg at line 824-825 and 4-arg at lines 1017-1019). The calls are made in semantically appropriate contexts (non-coroutine vs. coroutine contexts), but the externalDataStoreHandlerheader cannot be inspected in this repository to verify both overloads still exist after the submodule was updated.
72b5c54 to
c98762b
Compare
c98762b to
8ca4b60
Compare
Summary by CodeRabbit
Refactor
Chore
✏️ Tip: You can customize this high-level summary in your review settings.