Skip to content

Commit 6cf99b7

Browse files
shangxinliclaude
andcommitted
fix: export ThreadPool symbols and silence google-runtime-int lint
Two CI failures from the previous push: 1. Meson lanes (Linux/macOS/Windows) failed to link `util_test` against `libiceberg.so` with undefined references to `iceberg::ThreadPool::*`. The project sets CXX_VISIBILITY_PRESET=hidden, so symbols crossing the shared- library boundary need ICEBERG_EXPORT. CMake builds use static archives locally, which is why this only surfaced on the Meson shared-lib lanes. Adding ICEBERG_EXPORT to the class follows the same pattern as RetryRunner/ExpireSnapshots: the `_internal.h` naming is a header-org hint, not a visibility decision. 2. cpp-linter (clang-tidy google-runtime-int) flagged `std::atomic<long>` in thread_pool_test.cc. Switched to `std::atomic<std::int64_t>`. The zizmor failure on the same run was a docker-pull timeout pulling `ghcr.io/zizmorcore/zizmor:latest` — pure infra flake, no source change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 6b6f323 commit 6cf99b7

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

src/iceberg/test/thread_pool_test.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
#include <atomic>
2121
#include <chrono>
22+
#include <cstdint>
2223
#include <span>
2324
#include <stdexcept>
2425
#include <thread>
@@ -47,7 +48,7 @@ TEST(ThreadPoolTest, RunAndWaitProcessesEveryItem) {
4748
std::vector<int> items(100);
4849
for (int i = 0; i < 100; ++i) items[i] = i;
4950

50-
std::atomic<long> sum{0};
51+
std::atomic<std::int64_t> sum{0};
5152
pool.RunAndWait<int>(std::span<const int>(items),
5253
[&](int v) { sum.fetch_add(v, std::memory_order_relaxed); });
5354

src/iceberg/util/thread_pool_internal.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
#include <utility>
3131
#include <vector>
3232

33+
#include "iceberg/iceberg_export.h"
34+
3335
namespace iceberg {
3436

3537
/// \brief Fixed-size worker pool for fire-and-wait task batches.
@@ -40,7 +42,7 @@ namespace iceberg {
4042
/// the constructor and joined in the destructor.
4143
///
4244
/// All public methods are thread-safe.
43-
class ThreadPool {
45+
class ICEBERG_EXPORT ThreadPool {
4446
public:
4547
/// \brief Construct a pool with `num_workers` worker threads. Must be > 0.
4648
explicit ThreadPool(std::size_t num_workers);

0 commit comments

Comments
 (0)