Skip to content

update compile script for eloqstore#344

Merged
yi-xmu merged 2 commits intomainfrom
update_build_script_for_eloqstore
Dec 9, 2025
Merged

update compile script for eloqstore#344
yi-xmu merged 2 commits intomainfrom
update_build_script_for_eloqstore

Conversation

@yi-xmu
Copy link
Copy Markdown
Collaborator

@yi-xmu yi-xmu commented Dec 4, 2025

Summary by CodeRabbit

  • Chores
    • Updated build system and tooling (generator and build flags) to modernize builds.
    • Improved runtime library handling and rpath so packaged binaries resolve dependencies consistently.
    • Refined packaging/artifact flow and tarball generation/upload steps.
    • Updated CI pipeline task names and streamlined submodule/integration wiring for store and log components.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Dec 4, 2025

Walkthrough

Refactors build scripts and Concourse pipelines: reworks workspace and git submodule orchestration, changes CMake to Ninja with shared libs, adjusts data-store/DSS paths and conditional eloqstore wiring, updates binary rpath handling and artifact task names in CI pipelines.

Changes

Cohort / File(s) Change Summary
Build script & submodule orchestration
concourse/scripts/build_tarball.bash
Changed working dir to $HOME/workspace; added/adjusted git submodule sync/update steps; reorganized submodule init/linking for eloq_log_service, raft_host_manager, and conditional eloqstore under data_substrate; removed legacy nested submodule sync blocks; updated DSS source path references.
CMake / build flags and runtime handling
concourse/scripts/build_tarball.bash, src/mongo/db/modules/eloq/SConscript
Switched CMake generator to Ninja; enabled -DBUILD_SHARED_LIBS=ON; removed COROUTINE_ENABLED; added EXT_TX_PROC_ENABLED define to ELOQ SConscript; appended -DELOQ_MODULE_ENABLED=ON for ELOQDSS_ELOQSTORE builds; adjusted library copy behavior and set ELF rpath ($ORIGIN / $ORIGIN/../lib) for produced binaries.
Concourse pipeline task renames
concourse/pipeline/build_debug_tarball.yml, concourse/pipeline/build_nightly_tarball.yml, concourse/pipeline/build_release_tarball.yml
Renamed task identifiers from build-rocksdb-cloud-... / rocksdb-cloud-s3 / eloqdss-rocksdb / eloqdss-eloqstore variants to build-eloqdss-... equivalents across multiple job blocks; preserved parameters and job structure.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Inspect conditional submodule init/link logic for ELOQDSS_ELOQSTORE to ensure correct paths and idempotence.
  • Validate CMake generator switch and BUILD_SHARED_LIBS impact on downstream link flags and packaging.
  • Confirm rpath values and patchelf usage produce correct runtime behavior for all target binaries.
  • Review pipeline task renames for consistency across dependent jobs and task definitions.

Possibly related PRs

Suggested labels

trigger-ci

Suggested reviewers

  • xiexiaoy

Poem

I hop through workspaces, nimble and spry,
submodules lined up, one by one I try,
Ninja hums softly, shared libs in store,
rpath tucked neatly so binaries soar,
a carrot-sized tarball — built with a sigh 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is related to the main changes in the changeset, which involve updating build scripts and compilation configurations to support eloqstore as a data store option across multiple files.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch update_build_script_for_eloqstore

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fe4fadf and b41c5dc.

📒 Files selected for processing (5)
  • concourse/pipeline/build_debug_tarball.yml (2 hunks)
  • concourse/pipeline/build_nightly_tarball.yml (7 hunks)
  • concourse/pipeline/build_release_tarball.yml (6 hunks)
  • concourse/scripts/build_tarball.bash (3 hunks)
  • src/mongo/db/modules/eloq/SConscript (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • concourse/scripts/build_tarball.bash
🧰 Additional context used
🧠 Learnings (6)
📓 Common learnings
Learnt from: githubzilla
Repo: eloqdata/eloqdoc PR: 211
File: src/mongo/db/modules/eloq/cmake/build_eloq_log_service.cmake:26-80
Timestamp: 2025-09-25T12:24:06.434Z
Learning: The user githubzilla implemented a fix in commit fe98aaf to address the MEMORY state incorrectly triggering RocksDB discovery in build_eloq_log_service.cmake. This was a control flow issue where MEMORY builds were falling into an else branch that still attempted RocksDB discovery.
📚 Learning: 2025-09-25T11:58:50.446Z
Learnt from: githubzilla
Repo: eloqdata/eloqdoc PR: 211
File: src/mongo/db/modules/eloq/cmake/build_log_service.cmake:116-119
Timestamp: 2025-09-25T11:58:50.446Z
Learning: The build_log_service.cmake file is specifically for "open log" functionality and only supports the ROCKSDB log state type (LOG_STATE_TYPE_RKDB). The full log state configuration with cloud variants (ROCKSDB_CLOUD_S3, ROCKSDB_CLOUD_GCS) is handled in build_eloq_log_service.cmake.

Applied to files:

  • concourse/pipeline/build_debug_tarball.yml
  • concourse/pipeline/build_nightly_tarball.yml
  • src/mongo/db/modules/eloq/SConscript
  • concourse/pipeline/build_release_tarball.yml
📚 Learning: 2025-09-25T12:24:06.434Z
Learnt from: githubzilla
Repo: eloqdata/eloqdoc PR: 211
File: src/mongo/db/modules/eloq/cmake/build_eloq_log_service.cmake:26-80
Timestamp: 2025-09-25T12:24:06.434Z
Learning: The user githubzilla implemented a fix in commit fe98aaf to address the MEMORY state incorrectly triggering RocksDB discovery in build_eloq_log_service.cmake. This was a control flow issue where MEMORY builds were falling into an else branch that still attempted RocksDB discovery.

Applied to files:

  • concourse/pipeline/build_debug_tarball.yml
📚 Learning: 2025-11-28T10:52:25.527Z
Learnt from: githubzilla
Repo: eloqdata/eloqdoc PR: 279
File: concourse/scripts/main.ent.bash:38-39
Timestamp: 2025-11-28T10:52:25.527Z
Learning: In the eloqdoc enterprise build (main.ent.bash), eloq_log_service is fetched separately as the resource `eloq_logservice_src` in the pipeline (main.ent.yml) and then symlinked into the data_substrate directory structure at build time using `ln -s $WORKSPACE/eloq_logservice_src eloq_log_service`. This is the intended architecture for placing eloq_log_service within data_substrate in the enterprise configuration.

Applied to files:

  • concourse/pipeline/build_nightly_tarball.yml
📚 Learning: 2025-11-28T10:55:21.020Z
Learnt from: githubzilla
Repo: eloqdata/eloqdoc PR: 279
File: src/mongo/db/modules/eloq/CMakeLists.txt:54-55
Timestamp: 2025-11-28T10:55:21.020Z
Learning: In src/mongo/db/modules/eloq/CMakeLists.txt, the CMake options EXT_TX_PROC_ENABLED, FORK_HM_PROCESS, and STATISTICS are used by the data_substrate submodule build system and should be retained as configuration interface options.

Applied to files:

  • src/mongo/db/modules/eloq/SConscript
📚 Learning: 2025-09-25T12:09:01.276Z
Learnt from: githubzilla
Repo: eloqdata/eloqdoc PR: 211
File: src/mongo/db/modules/eloq/src/eloq_kv_engine.cpp:95-115
Timestamp: 2025-09-25T12:09:01.276Z
Learning: The log states (LOG_STATE_TYPE_RKDB, LOG_STATE_TYPE_RKDB_S3, LOG_STATE_TYPE_RKDB_GCS) in the EloqDoc codebase are mutually exclusive - only one can be active at a time. The LOG_STATE_TYPE_RKDB_CLOUD macro is a helper that should only be defined for cloud variants (S3/GCS) and not when regular RKDB is active.

Applied to files:

  • src/mongo/db/modules/eloq/SConscript
🔇 Additional comments (7)
src/mongo/db/modules/eloq/SConscript (1)

69-69: LGTM! Build configuration flag addition aligns with submodule requirements.

The addition of EXT_TX_PROC_ENABLED is consistent with the data_substrate submodule's build configuration requirements.

Based on learnings, this flag is used by the data_substrate submodule build system as a configuration interface option.

concourse/pipeline/build_debug_tarball.yml (2)

70-86: LGTM! Task renaming improves naming consistency.

The task name now aligns with the DATA_STORE_TYPE: ELOQDSS_ROCKSDB_CLOUD_S3 parameter, improving clarity and consistency across the pipeline.


88-104: LGTM! Task renaming improves naming consistency.

The task name now aligns with the DATA_STORE_TYPE: ELOQDSS_ROCKSDB_CLOUD_GCS parameter, improving clarity and consistency across the pipeline.

concourse/pipeline/build_release_tarball.yml (1)

76-90: LGTM! Systematic task renaming improves consistency across all platform builds.

The task names have been consistently updated to build-eloqdss-rocksdb-cloud-s3-type across all platform jobs (ubuntu2004, ubuntu2204, ubuntu2404, centos7, centos8, rocky9), aligning with the ELOQDSS_* naming convention used in the DATA_STORE_TYPE parameters.

Also applies to: 142-156, 209-224, 259-273, 307-321, 355-369

concourse/pipeline/build_nightly_tarball.yml (3)

65-81: LGTM! Task renaming improves consistency across nightly builds.

The task names now consistently use the build-eloqdss-rocksdb-cloud-s3-type pattern across ubuntu2004, ubuntu2204, and ubuntu2404 jobs, aligning with the DATA_STORE_TYPE parameter values.

Also applies to: 149-165, 231-247


99-115: LGTM! Task renaming improves consistency across nightly builds.

The task names now consistently use the build-eloqdss-rocksdb-type pattern across ubuntu2004, ubuntu2204, and ubuntu2404 jobs, aligning with the DATA_STORE_TYPE parameter values.

Also applies to: 181-197, 263-279


214-230: LGTM! Task renaming improves consistency.

The task name now uses the standardized build-eloqdss-eloqstore-type pattern, consistent with the other renamed tasks in this PR.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 (2)
concourse/scripts/build_tarball.bash (2)

79-82: Missing safe.directory entry for eloqstore_src on RHEL 9 causes build failure with ELOQDSS_ELOQSTORE.

When DATA_STORE_TYPE=ELOQDSS_ELOQSTORE on RHEL 9, the script symlinks eloqstore_src (line 41) and then attempts git submodule sync on it (line 43). However, eloqstore_src is not in the safe.directory list, causing git to reject the operation with a "dubious ownership" error.

Add eloqstore_src to safe.directory conditionally within the RHEL 9 block:

    git config --global --add safe.directory ${WORKSPACE}/eloqdoc_src
    git config --global --add safe.directory ${WORKSPACE}/eloq_logservice_src
    git config --global --add safe.directory ${WORKSPACE}/raft_host_manager_src
+   if [ "${DATA_STORE_TYPE}" = "ELOQDSS_ELOQSTORE" ]; then
+       git config --global --add safe.directory ${WORKSPACE}/eloqstore_src
+   fi

126-126: Update error messages to include ELOQDSS_ELOQSTORE as supported DATA_STORE_TYPE.

Both error messages omit ELOQDSS_ELOQSTORE from the supported types list, even though it is validated and handled at lines 137-138. This inconsistency can mislead developers.

Update line 126:

-  echo "DATA_STORE_TYPE must be provided. Supported: ELOQDSS_ROCKSDB_CLOUD_S3, ELOQDSS_ROCKSDB_CLOUD_GCS, ELOQDSS_ROCKSDB"
+  echo "DATA_STORE_TYPE must be provided. Supported: ELOQDSS_ROCKSDB_CLOUD_S3, ELOQDSS_ROCKSDB_CLOUD_GCS, ELOQDSS_ROCKSDB, ELOQDSS_ELOQSTORE"

Update line 140:

-  echo "Unsupported DATA_STORE_TYPE: ${DATA_STORE_TYPE}. Supported: ELOQDSS_ROCKSDB_CLOUD_S3, ELOQDSS_ROCKSDB_CLOUD_GCS, ELOQDSS_ROCKSDB"
+  echo "Unsupported DATA_STORE_TYPE: ${DATA_STORE_TYPE}. Supported: ELOQDSS_ROCKSDB_CLOUD_S3, ELOQDSS_ROCKSDB_CLOUD_GCS, ELOQDSS_ROCKSDB, ELOQDSS_ELOQSTORE"

Also applies to: 140-140

🧹 Nitpick comments (2)
concourse/scripts/build_tarball.bash (2)

40-45: Inconsistent pushd/popd pattern compared to eloq_log_service.

Lines 30-33 correctly use pushd to enter eloq_log_service. Lines 40-45 use a different pattern: pushd to store_handler path, then cd eloqstore, then popd. For consistency and clarity, use nested pushd/popd:

  pushd src/mongo/db/modules/eloq/data_substrate/store_handler/eloq_data_store_service
  ln -s $WORKSPACE/eloqstore_src eloqstore
-  cd eloqstore
+  pushd eloqstore
   git submodule sync
   git submodule update --init --recursive
+  popd
   popd

294-298: Clarify DSS_CMAKE_ARGS initialization.

Line 295 appends to ${DSS_CMAKE_ARGS} which is undefined at this point. While bash word splitting handles this gracefully (expands to empty string), explicit initialization improves clarity for future maintainers:

+  DSS_CMAKE_ARGS=""
   if [ "${DATA_STORE_TYPE}" = "ELOQDSS_ELOQSTORE" ]; then
     DSS_CMAKE_ARGS="${DSS_CMAKE_ARGS} -DELOQ_MODULE_ENABLED=ON"
   fi
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 640c8b0 and 0c2373d.

📒 Files selected for processing (1)
  • concourse/scripts/build_tarball.bash (2 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: githubzilla
Repo: eloqdata/eloqdoc PR: 211
File: src/mongo/db/modules/eloq/cmake/build_eloq_log_service.cmake:26-80
Timestamp: 2025-09-25T12:24:06.434Z
Learning: The user githubzilla implemented a fix in commit fe98aaf to address the MEMORY state incorrectly triggering RocksDB discovery in build_eloq_log_service.cmake. This was a control flow issue where MEMORY builds were falling into an else branch that still attempted RocksDB discovery.
Learnt from: githubzilla
Repo: eloqdata/eloqdoc PR: 279
File: concourse/scripts/main.ent.bash:38-39
Timestamp: 2025-11-28T10:52:25.527Z
Learning: In the eloqdoc enterprise build (main.ent.bash), eloq_log_service is fetched separately as the resource `eloq_logservice_src` in the pipeline (main.ent.yml) and then symlinked into the data_substrate directory structure at build time using `ln -s $WORKSPACE/eloq_logservice_src eloq_log_service`. This is the intended architecture for placing eloq_log_service within data_substrate in the enterprise configuration.
Learnt from: githubzilla
Repo: eloqdata/eloqdoc PR: 279
File: src/mongo/db/modules/eloq/CMakeLists.txt:54-55
Timestamp: 2025-11-28T10:55:21.020Z
Learning: In src/mongo/db/modules/eloq/CMakeLists.txt, the CMake options EXT_TX_PROC_ENABLED, FORK_HM_PROCESS, and STATISTICS are used by the data_substrate submodule build system and should be retained as configuration interface options.
Learnt from: githubzilla
Repo: eloqdata/eloqdoc PR: 211
File: src/mongo/db/modules/eloq/cmake/build_log_service.cmake:116-119
Timestamp: 2025-09-25T11:58:50.446Z
Learning: The build_log_service.cmake file is specifically for "open log" functionality and only supports the ROCKSDB log state type (LOG_STATE_TYPE_RKDB). The full log state configuration with cloud variants (ROCKSDB_CLOUD_S3, ROCKSDB_CLOUD_GCS) is handled in build_eloq_log_service.cmake.
📚 Learning: 2025-11-28T10:52:25.527Z
Learnt from: githubzilla
Repo: eloqdata/eloqdoc PR: 279
File: concourse/scripts/main.ent.bash:38-39
Timestamp: 2025-11-28T10:52:25.527Z
Learning: In the eloqdoc enterprise build (main.ent.bash), eloq_log_service is fetched separately as the resource `eloq_logservice_src` in the pipeline (main.ent.yml) and then symlinked into the data_substrate directory structure at build time using `ln -s $WORKSPACE/eloq_logservice_src eloq_log_service`. This is the intended architecture for placing eloq_log_service within data_substrate in the enterprise configuration.

Applied to files:

  • concourse/scripts/build_tarball.bash
📚 Learning: 2025-11-28T10:55:21.020Z
Learnt from: githubzilla
Repo: eloqdata/eloqdoc PR: 279
File: src/mongo/db/modules/eloq/CMakeLists.txt:54-55
Timestamp: 2025-11-28T10:55:21.020Z
Learning: In src/mongo/db/modules/eloq/CMakeLists.txt, the CMake options EXT_TX_PROC_ENABLED, FORK_HM_PROCESS, and STATISTICS are used by the data_substrate submodule build system and should be retained as configuration interface options.

Applied to files:

  • concourse/scripts/build_tarball.bash
📚 Learning: 2025-09-25T11:58:50.446Z
Learnt from: githubzilla
Repo: eloqdata/eloqdoc PR: 211
File: src/mongo/db/modules/eloq/cmake/build_log_service.cmake:116-119
Timestamp: 2025-09-25T11:58:50.446Z
Learning: The build_log_service.cmake file is specifically for "open log" functionality and only supports the ROCKSDB log state type (LOG_STATE_TYPE_RKDB). The full log state configuration with cloud variants (ROCKSDB_CLOUD_S3, ROCKSDB_CLOUD_GCS) is handled in build_eloq_log_service.cmake.

Applied to files:

  • concourse/scripts/build_tarball.bash
🔇 Additional comments (4)
concourse/scripts/build_tarball.bash (4)

114-118: LGTM – Clean normalization of ELOQ_MODULE_ENABLED flag.

Correct conversion of string-based environment variable to CMake boolean format.


206-231: LGTM – Correct DATA_STORE_TYPE to WITH_LOG_STATE mapping and CMake configuration.

DATA_STORE_TYPE variants properly mapped to log state configuration. CMake options (EXT_TX_PROC_ENABLED, FORK_HM_PROCESS, STATISTICS) retained as interface options per architectural requirements. OPEN_LOG_SERVICE correctly disabled.


305-313: LGTM – Comprehensive runtime linker correction strategy.

Binary rpath corrections via patchelf are properly applied, with appropriate relative paths ($ORIGIN/../lib for binaries, $ORIGIN for libraries). Conditional checks for optional binaries (host_manager, dss_server) prevent errors if not present.


1-50: Submodule and directory orchestration correctly implements intended architecture.

The restructured submodule handling properly places eloq_log_service within data_substrate and conditionally includes eloqstore and raft_host_manager per PR objectives. Directory flow via pushd/popd is generally sound and recovers correctly to expected positions. Learning 1 (PR 279) regarding log_service placement is correctly implemented.

However, the critical blocker is the missing safe.directory entry for eloqstore_src—see dedicated comment above.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
concourse/scripts/build_tarball.bash (1)

79-82: Missing safe.directory entry for eloqstore_src on rhel9.

Lines 79–81 configure git safe.directory entries for rhel9 to handle "dubious ownership" errors when submodules are checked out from external workspaces. However, the list is incomplete: eloqstore_src is missing. Since line 41 creates a symlink to eloqstore_src when DATA_STORE_TYPE is ELOQDSS_ELOQSTORE, and line 44 runs git submodule update on it, the submodule initialization will fail on rhel9 with this data store type due to the missing safe.directory entry.

Apply this diff to include the missing entry:

        git config --global --add safe.directory ${WORKSPACE}/eloqdoc_src
        git config --global --add safe.directory ${WORKSPACE}/eloq_logservice_src
        git config --global --add safe.directory ${WORKSPACE}/raft_host_manager_src
+       git config --global --add safe.directory ${WORKSPACE}/eloqstore_src
🧹 Nitpick comments (1)
concourse/scripts/build_tarball.bash (1)

294-296: Uninitialized variable concatenation in DSS_CMAKE_ARGS.

Line 295 appends to ${DSS_CMAKE_ARGS} without first initializing the variable. If the variable is unset, the expansion will result in a leading space in the string, which is harmless in this context but represents unclear intent and poor shell practice. Additionally, DSS_CMAKE_ARGS is only populated for ELOQDSS_ELOQSTORE; for other ELOQDSS_* types, it remains unset and expands to empty at line 298, which is correct but inconsistent.

Apply this diff to initialize the variable explicitly:

  if [ -n "${DSS_TYPE}" ]; then
    DSS_SRC_DIR="${ELOQDOC_SRC}/src/mongo/db/modules/eloq/data_substrate/store_handler/eloq_data_store_service"
    cd "${DSS_SRC_DIR}"
+   DSS_CMAKE_ARGS=""
    if [ "${DATA_STORE_TYPE}" = "ELOQDSS_ELOQSTORE" ]; then
-     DSS_CMAKE_ARGS="${DSS_CMAKE_ARGS} -DELOQ_MODULE_ENABLED=ON"
+     DSS_CMAKE_ARGS="-DELOQ_MODULE_ENABLED=ON"
    fi
    mkdir -p build && cd build
-   cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DWITH_DATA_STORE=${DSS_TYPE} -DUSE_ONE_ELOQDSS_PARTITION_ENABLED=OFF ${DSS_CMAKE_ARGS}
+   cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DWITH_DATA_STORE=${DSS_TYPE} -DUSE_ONE_ELOQDSS_PARTITION_ENABLED=OFF ${DSS_CMAKE_ARGS:+ ${DSS_CMAKE_ARGS}}

Alternatively, if you prefer to keep the append logic, initialize before the if block:

  if [ -n "${DSS_TYPE}" ]; then
    DSS_SRC_DIR="${ELOQDOC_SRC}/src/mongo/db/modules/eloq/data_substrate/store_handler/eloq_data_store_service"
    cd "${DSS_SRC_DIR}"
+   DSS_CMAKE_ARGS=""
    if [ "${DATA_STORE_TYPE}" = "ELOQDSS_ELOQSTORE" ]; then
      DSS_CMAKE_ARGS="${DSS_CMAKE_ARGS:+${DSS_CMAKE_ARGS} }-DELOQ_MODULE_ENABLED=ON"
    fi
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0c2373d and 9236846.

📒 Files selected for processing (1)
  • concourse/scripts/build_tarball.bash (2 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: githubzilla
Repo: eloqdata/eloqdoc PR: 211
File: src/mongo/db/modules/eloq/cmake/build_eloq_log_service.cmake:26-80
Timestamp: 2025-09-25T12:24:06.434Z
Learning: The user githubzilla implemented a fix in commit fe98aaf to address the MEMORY state incorrectly triggering RocksDB discovery in build_eloq_log_service.cmake. This was a control flow issue where MEMORY builds were falling into an else branch that still attempted RocksDB discovery.
Learnt from: githubzilla
Repo: eloqdata/eloqdoc PR: 279
File: concourse/scripts/main.ent.bash:38-39
Timestamp: 2025-11-28T10:52:25.527Z
Learning: In the eloqdoc enterprise build (main.ent.bash), eloq_log_service is fetched separately as the resource `eloq_logservice_src` in the pipeline (main.ent.yml) and then symlinked into the data_substrate directory structure at build time using `ln -s $WORKSPACE/eloq_logservice_src eloq_log_service`. This is the intended architecture for placing eloq_log_service within data_substrate in the enterprise configuration.
Learnt from: githubzilla
Repo: eloqdata/eloqdoc PR: 279
File: src/mongo/db/modules/eloq/CMakeLists.txt:54-55
Timestamp: 2025-11-28T10:55:21.020Z
Learning: In src/mongo/db/modules/eloq/CMakeLists.txt, the CMake options EXT_TX_PROC_ENABLED, FORK_HM_PROCESS, and STATISTICS are used by the data_substrate submodule build system and should be retained as configuration interface options.
📚 Learning: 2025-11-28T10:52:25.527Z
Learnt from: githubzilla
Repo: eloqdata/eloqdoc PR: 279
File: concourse/scripts/main.ent.bash:38-39
Timestamp: 2025-11-28T10:52:25.527Z
Learning: In the eloqdoc enterprise build (main.ent.bash), eloq_log_service is fetched separately as the resource `eloq_logservice_src` in the pipeline (main.ent.yml) and then symlinked into the data_substrate directory structure at build time using `ln -s $WORKSPACE/eloq_logservice_src eloq_log_service`. This is the intended architecture for placing eloq_log_service within data_substrate in the enterprise configuration.

Applied to files:

  • concourse/scripts/build_tarball.bash
📚 Learning: 2025-11-28T10:55:21.020Z
Learnt from: githubzilla
Repo: eloqdata/eloqdoc PR: 279
File: src/mongo/db/modules/eloq/CMakeLists.txt:54-55
Timestamp: 2025-11-28T10:55:21.020Z
Learning: In src/mongo/db/modules/eloq/CMakeLists.txt, the CMake options EXT_TX_PROC_ENABLED, FORK_HM_PROCESS, and STATISTICS are used by the data_substrate submodule build system and should be retained as configuration interface options.

Applied to files:

  • concourse/scripts/build_tarball.bash
📚 Learning: 2025-09-25T11:58:50.446Z
Learnt from: githubzilla
Repo: eloqdata/eloqdoc PR: 211
File: src/mongo/db/modules/eloq/cmake/build_log_service.cmake:116-119
Timestamp: 2025-09-25T11:58:50.446Z
Learning: The build_log_service.cmake file is specifically for "open log" functionality and only supports the ROCKSDB log state type (LOG_STATE_TYPE_RKDB). The full log state configuration with cloud variants (ROCKSDB_CLOUD_S3, ROCKSDB_CLOUD_GCS) is handled in build_eloq_log_service.cmake.

Applied to files:

  • concourse/scripts/build_tarball.bash
🔇 Additional comments (6)
concourse/scripts/build_tarball.bash (6)

25-26: Alignment with enterprise submodule sync pattern.

The addition of git submodule sync and git submodule update --init --recursive for the eloqdoc root module aligns with the enterprise build architecture and provides proper initialization for nested submodules. Based on learnings, this matches the intended pattern for data_substrate integration.


28-33: Data substrate and eloq_log_service setup follows established architecture.

The directory traversal to data_substrate, symlink creation for eloq_log_service, and recursive submodule initialization align with the enterprise build pattern documented in PR 279. The per-submodule sync/update flow is appropriate. Based on learnings, this matches the intended symlink architecture for placing eloq_log_service within data_substrate.


292-303: DSS build path correctly updated to data_substrate layout.

The DSS source directory has been properly relocated to data_substrate/store_handler/eloq_data_store_service, and the conditional DSS build is triggered only when DATA_STORE_TYPE begins with ELOQDSS_. The submodule initialization for eloqstore and the conditional CMake argument passing align with the new architecture. Based on learnings from PR 279, this placement is correct.


305-313: RPATH fixes for executables are comprehensive and appropriately targeted.

The patchelf invocations correctly set $ORIGIN/../lib for the main executables (eloqdoc-cli, eloqdoc, host_manager, dss_server) and include proper existence checks before applying the RPATH. This ensures runtime library discovery is relative to the binary location, improving portability of the tarball. Combined with the library-level $ORIGIN fix at line 195, the approach is consistent and sound.


322-330: Tarball naming logic correctly differentiates tagged and non-tagged builds.

The tarball naming now includes OS_ID and ARCH for tagged builds (line 323), providing clear identifiers for release artifacts. The fallback to OUT_NAME for non-tagged builds (line 329) preserves CI flexibility. The SQL logging at line 326 captures release metadata appropriately for tagged builds only. No issues identified.


70-70: No changes needed. Line 70 uses correct SCL syntax for RHEL 8.

The source scl_source enable gcc-toolset-11 syntax on line 70 is valid and officially documented by Red Hat for persistent shell activation of gcc-toolset-11 on RHEL 8. The difference from line 63's source /opt/rh/devtoolset-11/enable (RHEL 7) is expected—the package naming changed from "devtoolset" to "gcc-toolset" between RHEL 7 and 8, and scl_source is a standard Software Collections utility function, not a custom one. Both syntaxes are correct alternatives for their respective platforms.

Likely an incorrect or invalid review comment.

@yi-xmu yi-xmu force-pushed the update_build_script_for_eloqstore branch from 1514f68 to 4d0c3ad Compare December 4, 2025 14:51
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
concourse/scripts/build_tarball.bash (1)

20-22: Apply mkdir -p before chown and cd to ensure $HOME/workspace exists.

If $HOME/workspace does not exist, both the chown at line 20 and the cd at line 22 will fail. This issue was flagged in a prior review and remains unresolved.

Apply this diff:

  # Ensure workspace ownership
+ mkdir -p $HOME/workspace
  sudo chown -R $current_user $HOME/workspace 2>/dev/null || true
  
  cd $HOME/workspace
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9236846 and 4d0c3ad.

📒 Files selected for processing (1)
  • concourse/scripts/build_tarball.bash (4 hunks)
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: githubzilla
Repo: eloqdata/eloqdoc PR: 211
File: src/mongo/db/modules/eloq/cmake/build_eloq_log_service.cmake:26-80
Timestamp: 2025-09-25T12:24:06.434Z
Learning: The user githubzilla implemented a fix in commit fe98aaf to address the MEMORY state incorrectly triggering RocksDB discovery in build_eloq_log_service.cmake. This was a control flow issue where MEMORY builds were falling into an else branch that still attempted RocksDB discovery.
Learnt from: githubzilla
Repo: eloqdata/eloqdoc PR: 279
File: concourse/scripts/main.ent.bash:38-39
Timestamp: 2025-11-28T10:52:25.527Z
Learning: In the eloqdoc enterprise build (main.ent.bash), eloq_log_service is fetched separately as the resource `eloq_logservice_src` in the pipeline (main.ent.yml) and then symlinked into the data_substrate directory structure at build time using `ln -s $WORKSPACE/eloq_logservice_src eloq_log_service`. This is the intended architecture for placing eloq_log_service within data_substrate in the enterprise configuration.
📚 Learning: 2025-11-28T10:52:25.527Z
Learnt from: githubzilla
Repo: eloqdata/eloqdoc PR: 279
File: concourse/scripts/main.ent.bash:38-39
Timestamp: 2025-11-28T10:52:25.527Z
Learning: In the eloqdoc enterprise build (main.ent.bash), eloq_log_service is fetched separately as the resource `eloq_logservice_src` in the pipeline (main.ent.yml) and then symlinked into the data_substrate directory structure at build time using `ln -s $WORKSPACE/eloq_logservice_src eloq_log_service`. This is the intended architecture for placing eloq_log_service within data_substrate in the enterprise configuration.

Applied to files:

  • concourse/scripts/build_tarball.bash
📚 Learning: 2025-11-28T10:55:21.020Z
Learnt from: githubzilla
Repo: eloqdata/eloqdoc PR: 279
File: src/mongo/db/modules/eloq/CMakeLists.txt:54-55
Timestamp: 2025-11-28T10:55:21.020Z
Learning: In src/mongo/db/modules/eloq/CMakeLists.txt, the CMake options EXT_TX_PROC_ENABLED, FORK_HM_PROCESS, and STATISTICS are used by the data_substrate submodule build system and should be retained as configuration interface options.

Applied to files:

  • concourse/scripts/build_tarball.bash
📚 Learning: 2025-09-25T11:58:50.446Z
Learnt from: githubzilla
Repo: eloqdata/eloqdoc PR: 211
File: src/mongo/db/modules/eloq/cmake/build_log_service.cmake:116-119
Timestamp: 2025-09-25T11:58:50.446Z
Learning: The build_log_service.cmake file is specifically for "open log" functionality and only supports the ROCKSDB log state type (LOG_STATE_TYPE_RKDB). The full log state configuration with cloud variants (ROCKSDB_CLOUD_S3, ROCKSDB_CLOUD_GCS) is handled in build_eloq_log_service.cmake.

Applied to files:

  • concourse/scripts/build_tarball.bash
📚 Learning: 2025-09-25T12:24:06.434Z
Learnt from: githubzilla
Repo: eloqdata/eloqdoc PR: 211
File: src/mongo/db/modules/eloq/cmake/build_eloq_log_service.cmake:26-80
Timestamp: 2025-09-25T12:24:06.434Z
Learning: The user githubzilla implemented a fix in commit fe98aaf to address the MEMORY state incorrectly triggering RocksDB discovery in build_eloq_log_service.cmake. This was a control flow issue where MEMORY builds were falling into an else branch that still attempted RocksDB discovery.

Applied to files:

  • concourse/scripts/build_tarball.bash
🔇 Additional comments (5)
concourse/scripts/build_tarball.bash (5)

25-26: Submodule sync and data_substrate architecture align with intended design.

The per-submodule sync pattern (lines 25–26, 31–32, 43–44) and symlink strategy for eloq_log_service and raft_host_manager are correctly structured and match the data_substrate layout described in prior learnings.

Also applies to: 28-37


39-46: Conditional eloqstore submodule sync and directory management are correct.

The nested cd into eloqstore at line 42 occurs within the pushd context from line 40, so the popd at line 45 correctly unwinds the stack. Conditional guard on DATA_STORE_TYPE is appropriate.


216-216: CMake generator switch to Ninja and new build flags are appropriately configured.

The switch from "Unix Makefiles" to "Ninja" improves build parallelization. The addition of -DEXT_TX_PROC_ENABLED=ON aligns with data_substrate configuration requirements documented in prior learnings.

Also applies to: 223-223


294-296: Clarify DSS_CMAKE_ARGS initialization and usage.

Line 295 appends to DSS_CMAKE_ARGS via "${DSS_CMAKE_ARGS} -DELOQ_MODULE_ENABLED=ON", but there is no visible initialization of DSS_CMAKE_ARGS in the script. If this is an environment variable provided by the Concourse pipeline, that should be documented. If not, consider explicitly initializing it to avoid potential hidden bugs.

Verify whether DSS_CMAKE_ARGS is:

  1. A pre-set environment variable from the Concourse pipeline, or
  2. A variable that should be initialized in this script (e.g., DSS_CMAKE_ARGS="").

If it is a pipeline environment variable, consider adding a comment to clarify the contract.


39-46: Data_substrate layout changes are consistently integrated throughout the script.

The refactoring of paths to use data_substrate/store_handler/eloq_data_store_service, symlink linking strategy, submodule sync operations, and config file handling are all appropriately updated and consistent with the new workspace structure.

Also applies to: 292-298, 316-316

@yi-xmu yi-xmu force-pushed the update_build_script_for_eloqstore branch 6 times, most recently from 5585f25 to 0274fa5 Compare December 8, 2025 10:49
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
concourse/scripts/build_tarball.bash (1)

15-24: Directory $HOME/workspace is not created before cd.

Line 22 attempts to cd $HOME/workspace, but the directory is never created before this operation. Line 20 only performs a chown on a non-existent directory, which will silently fail due to the 2>/dev/null || true error suppression. If $HOME/workspace doesn't exist, the cd will fail.

A previous review flagged this and noted it was addressed, but mkdir -p $HOME/workspace is absent from the current code.

Apply this diff to ensure the directory exists:

  # Ensure workspace ownership
+ mkdir -p $HOME/workspace
  sudo chown -R $current_user $HOME/workspace 2>/dev/null || true

  cd $HOME/workspace
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5585f25 and 0274fa5.

📒 Files selected for processing (1)
  • concourse/scripts/build_tarball.bash (4 hunks)
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: githubzilla
Repo: eloqdata/eloqdoc PR: 211
File: src/mongo/db/modules/eloq/cmake/build_eloq_log_service.cmake:26-80
Timestamp: 2025-09-25T12:24:06.434Z
Learning: The user githubzilla implemented a fix in commit fe98aaf to address the MEMORY state incorrectly triggering RocksDB discovery in build_eloq_log_service.cmake. This was a control flow issue where MEMORY builds were falling into an else branch that still attempted RocksDB discovery.
Learnt from: githubzilla
Repo: eloqdata/eloqdoc PR: 279
File: concourse/scripts/main.ent.bash:38-39
Timestamp: 2025-11-28T10:52:25.527Z
Learning: In the eloqdoc enterprise build (main.ent.bash), eloq_log_service is fetched separately as the resource `eloq_logservice_src` in the pipeline (main.ent.yml) and then symlinked into the data_substrate directory structure at build time using `ln -s $WORKSPACE/eloq_logservice_src eloq_log_service`. This is the intended architecture for placing eloq_log_service within data_substrate in the enterprise configuration.
📚 Learning: 2025-11-28T10:52:25.527Z
Learnt from: githubzilla
Repo: eloqdata/eloqdoc PR: 279
File: concourse/scripts/main.ent.bash:38-39
Timestamp: 2025-11-28T10:52:25.527Z
Learning: In the eloqdoc enterprise build (main.ent.bash), eloq_log_service is fetched separately as the resource `eloq_logservice_src` in the pipeline (main.ent.yml) and then symlinked into the data_substrate directory structure at build time using `ln -s $WORKSPACE/eloq_logservice_src eloq_log_service`. This is the intended architecture for placing eloq_log_service within data_substrate in the enterprise configuration.

Applied to files:

  • concourse/scripts/build_tarball.bash
📚 Learning: 2025-11-28T10:55:21.020Z
Learnt from: githubzilla
Repo: eloqdata/eloqdoc PR: 279
File: src/mongo/db/modules/eloq/CMakeLists.txt:54-55
Timestamp: 2025-11-28T10:55:21.020Z
Learning: In src/mongo/db/modules/eloq/CMakeLists.txt, the CMake options EXT_TX_PROC_ENABLED, FORK_HM_PROCESS, and STATISTICS are used by the data_substrate submodule build system and should be retained as configuration interface options.

Applied to files:

  • concourse/scripts/build_tarball.bash
📚 Learning: 2025-09-25T11:58:50.446Z
Learnt from: githubzilla
Repo: eloqdata/eloqdoc PR: 211
File: src/mongo/db/modules/eloq/cmake/build_log_service.cmake:116-119
Timestamp: 2025-09-25T11:58:50.446Z
Learning: The build_log_service.cmake file is specifically for "open log" functionality and only supports the ROCKSDB log state type (LOG_STATE_TYPE_RKDB). The full log state configuration with cloud variants (ROCKSDB_CLOUD_S3, ROCKSDB_CLOUD_GCS) is handled in build_eloq_log_service.cmake.

Applied to files:

  • concourse/scripts/build_tarball.bash
📚 Learning: 2025-09-25T12:24:06.434Z
Learnt from: githubzilla
Repo: eloqdata/eloqdoc PR: 211
File: src/mongo/db/modules/eloq/cmake/build_eloq_log_service.cmake:26-80
Timestamp: 2025-09-25T12:24:06.434Z
Learning: The user githubzilla implemented a fix in commit fe98aaf to address the MEMORY state incorrectly triggering RocksDB discovery in build_eloq_log_service.cmake. This was a control flow issue where MEMORY builds were falling into an else branch that still attempted RocksDB discovery.

Applied to files:

  • concourse/scripts/build_tarball.bash
🔇 Additional comments (4)
concourse/scripts/build_tarball.bash (4)

28-46: Submodule orchestration correctly structures Eloq components within data_substrate.

The symlink setup for eloq_log_service, raft_host_manager, and (conditionally) eloqstore properly mirrors the intended architecture. Submodule sync/update calls are correctly nested, and the conditional ELOQDSS_ELOQSTORE path adds the necessary git housekeeping for the eloqstore component. Based on learnings, this aligns with the symlink-based integration pattern used in the enterprise build.


216-231: CMake configuration correctly switches to Ninja and preserves essential flags.

The change from Unix Makefiles to Ninja, along with -DBUILD_SHARED_LIBS=ON, -DEXT_TX_PROC_ENABLED=ON, -DSTATISTICS=ON, and -DELOQ_MODULE_ENABLED (conditional), aligns with the expected build configuration. These flags are retained per the learnings from prior architecture reviews. The conditionals for ELOQ_MODULE_ENABLED and log state (WITH_LOG_STATE) are appropriately wired.


185-198: Verify the semantic change from --ignore-existing to --ignore-times in rsync.

Line 191 changes the rsync flag from --ignore-existing (skip if destination exists) to --ignore-times (update if modification time differs). This is a semantic change that will now overwrite libraries with differing timestamps, which may be intentional for dynamic library refresh but should be explicitly verified.

Confirm that forcing library updates via --ignore-times is the intended behavior and won't cause unintended overwrites or conflicts during parallel builds.


293-299: DSS source directory path and CMake arguments correctly updated for nested store_handler structure.

DSS_SRC_DIR now correctly points to the nested store_handler/eloq_data_store_service path within data_substrate. The conditional append of -DELOQ_MODULE_ENABLED=ON for ELOQDSS_ELOQSTORE ensures the DSS build receives the required flag when Eloqstore is the backing store. CMake invocation properly passes DSS_CMAKE_ARGS to the build.

Comment on lines +256 to +257
CPPDEFINES=$( [ ${ELOQ_MODULE_ENABLED} = "ON" ] && echo "ELOQ_MODULE_ENABLED" ) \
CPPDEFINES="EXT_TX_PROC_ENABLED" \
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

CPPDEFINES is overwritten; the ELOQ_MODULE_ENABLED flag is lost.

Line 256 conditionally sets CPPDEFINES to "ELOQ_MODULE_ENABLED" when the flag is ON, but line 257 immediately reassigns it unconditionally to "EXT_TX_PROC_ENABLED", discarding the prior value. Both flags are required when ELOQ_MODULE_ENABLED=ON.

A previous review flagged this issue and noted it was fixed in commit 5585f25, but the fix is not present in the current code. This appears to be a regression.

Apply this diff to combine both flags:

- CPPDEFINES=$( [ ${ELOQ_MODULE_ENABLED} = "ON" ] && echo "ELOQ_MODULE_ENABLED" ) \
- CPPDEFINES="EXT_TX_PROC_ENABLED" \
+ CPPDEFINES=$( [ ${ELOQ_MODULE_ENABLED} = "ON" ] && echo "ELOQ_MODULE_ENABLED EXT_TX_PROC_ENABLED" || echo "EXT_TX_PROC_ENABLED" ) \
🧰 Tools
🪛 Shellcheck (0.11.0)

[warning] 256-256: Quote this to prevent word splitting.

(SC2046)

🤖 Prompt for AI Agents
In concourse/scripts/build_tarball.bash around lines 256-257, CPPDEFINES is
being overwritten so the conditional ELOQ_MODULE_ENABLED flag is lost; change
the assignment so CPPDEFINES always contains EXT_TX_PROC_ENABLED and also
includes ELOQ_MODULE_ENABLED when ELOQ_MODULE_ENABLED=ON (for example build
CPPDEFINES by concatenating the conditional echo with EXT_TX_PROC_ENABLED,
ensuring proper quoting and spacing).

update

update

rebase code
@yi-xmu yi-xmu force-pushed the update_build_script_for_eloqstore branch from 012a0d9 to fe4fadf Compare December 9, 2025 06:20
@yi-xmu yi-xmu self-assigned this Dec 9, 2025
@yi-xmu yi-xmu merged commit bb7d020 into main Dec 9, 2025
3 checks passed
@yi-xmu yi-xmu deleted the update_build_script_for_eloqstore branch December 9, 2025 14:54
@coderabbitai coderabbitai bot mentioned this pull request Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants