`unit_tests_dbms` does not link without NuRaft: `gtest_keeper_storage_node.cpp` is not inside `#if USE_NURAFT`

オープン 初心者向け
#137,202 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
clickhouse, cpp
領域
databases, testing

調査の方向性

src/Coordination/tests/gtest_keeper_storage_node.cppから始め、そのUSE_NURAFTガードを、issueで言及されている他のKeeperユニットテストを囲むガードと比較します。NuRaftを無効にして、-DENABLE_LIBRARIES=0 -DENABLE_TESTS=1でunit_tests_dbmsをビルドします。この構成でターゲットのリンクに成功したら完了です。

索引モデルが issue の本文から書いたものです。

説明

build comp-keeper
Describe the problem

unit_tests_dbms does not link in a build without NuRaft (-DENABLE_NURAFT=OFF -DENABLE_TESTS=1, for example -DENABLE_LIBRARIES=0 with tests enabled):

FAILED: src/unit_tests_dbms
ld.lld: error: undefined symbol: Coordination::Storage::BlockData::create(unsigned long)
ld.lld: error: undefined symbol: Coordination::Storage::BlockData::appendNode(Coordination::Storage::BlockPtr&, Coordination::Storage::FullNode&)
ld.lld: error: undefined symbol: Coordination::Storage::destroyBlockData(Coordination::Storage::BlockData*)
ld.lld: error: undefined symbol: Coordination::Storage::NodeRef::read(Coordination::Storage::FullNode&, String&) const
ld.lld: error: undefined symbol: Coordination::Storage::NodeRef::readPath(Coordination::Storage::NodePath&, String&, unsigned int&, Coordination::Storage::NodeAction&) const
ld.lld: error: undefined symbol: Coordination::Storage::NodeRef::readSerializedSize() const
ld.lld: error: undefined symbol: Coordination::Storage::FullNode::getOrCalculateDigest()

All of them are referenced by src/Coordination/tests/gtest_keeper_storage_node.cpp. src/Coordination/Storage is built only when the ch_contrib::nuraft target exists, and the other Keeper unit tests (gtest_coordination*.cpp, Storage/tests/gtest_keeper_storage.cpp) are inside #if USE_NURAFT, but this file is not.

How to reproduce

Configure the current master with -DENABLE_LIBRARIES=0 -DENABLE_TESTS=1 (NuRaft is then off) and build unit_tests_dbms.

Expected behaviour

The test is inside #if USE_NURAFT, like the other Keeper unit tests, and the target links.

Caused by: https://github.com/ClickHouse/ClickHouse/pull/122037

主要言語
C++
スター
51.3k
フォーク
9.4k
平均マージ
10時間 19分
マージ済み PR(30日)
527

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ClickHouse/ClickHouse のほかの issue

ClickHouse/ClickHouse の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。