Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 0 additions & 4 deletions be/src/agent/cgroup_cpu_ctl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@

namespace doris {

#include "common/compile_check_begin.h"

bool CgroupCpuCtl::is_a_valid_cgroup_path(std::string cg_path) {
if (!cg_path.empty()) {
if (cg_path.back() != '/') {
Expand Down Expand Up @@ -445,6 +443,4 @@ Status CgroupV2CpuCtl::add_thread_to_cgroup() {
return CgroupCpuCtl::add_thread_to_cgroup(_cgroup_v2_query_wg_thread_file);
}

#include "common/compile_check_end.h"

} // namespace doris
4 changes: 2 additions & 2 deletions be/src/agent/task_worker_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@
#include "util/trace.h"

namespace doris {
#include "common/compile_check_begin.h"
using namespace ErrorCode;

namespace {
Expand Down Expand Up @@ -1775,7 +1774,9 @@ void create_tablet_callback(StorageEngine& engine, const TAgentTaskRequest& req)
Defer defer = [&] {
auto elapsed_time = static_cast<double>(watch.elapsed_time());
if (elapsed_time / 1e9 > config::agent_task_trace_threshold_sec) {
#include "common/compile_check_avoid_begin.h"
COUNTER_UPDATE(profile->total_time_counter(), elapsed_time);
#include "common/compile_check_avoid_end.h"
std::stringstream ss;
profile->pretty_print(&ss);
LOG(WARNING) << "create tablet cost(s) " << elapsed_time / 1e9 << std::endl << ss.str();
Expand Down Expand Up @@ -2527,5 +2528,4 @@ void report_index_policy_callback(const ClusterInfo* cluster_info) {
}
}

#include "common/compile_check_end.h"
} // namespace doris
3 changes: 0 additions & 3 deletions be/src/agent/workload_group_listener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@

namespace doris {

#include "common/compile_check_begin.h"

void WorkloadGroupListener::handle_topic_info(const std::vector<TopicInfo>& topic_info_list) {
std::set<uint64_t> current_wg_ids;
bool is_set_workload_group_info = false;
Expand Down Expand Up @@ -87,5 +85,4 @@ void WorkloadGroupListener::handle_topic_info(const std::vector<TopicInfo>& topi
_exec_env->workload_group_mgr()->delete_workload_group_by_ids(current_wg_ids);
}

#include "common/compile_check_end.h"
} // namespace doris
2 changes: 0 additions & 2 deletions be/src/cloud/cloud_committed_rs_mgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "util/thread.h"

namespace doris {
#include "common/compile_check_begin.h"
CloudCommittedRSMgr::CloudCommittedRSMgr() : _stop_latch(1) {}

CloudCommittedRSMgr::~CloudCommittedRSMgr() {
Expand Down Expand Up @@ -138,5 +137,4 @@ void CloudCommittedRSMgr::_clean_thread_callback() {
} while (!_stop_latch.wait_for(
std::chrono::seconds(config::remove_expired_tablet_txn_info_interval_seconds)));
}
#include "common/compile_check_end.h"
} // namespace doris
2 changes: 0 additions & 2 deletions be/src/cloud/cloud_committed_rs_mgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include "util/countdown_latch.h"

namespace doris {
#include "common/compile_check_begin.h"
class Thread;

// Manages temporary rowset meta for cloud storage transactions in memory.
Expand Down Expand Up @@ -83,5 +82,4 @@ class CloudCommittedRSMgr {
std::shared_ptr<Thread> _clean_thread;
CountDownLatch _stop_latch;
};
#include "common/compile_check_end.h"
} // namespace doris
2 changes: 0 additions & 2 deletions be/src/cloud/cloud_cumulative_compaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include "util/uuid_generator.h"

namespace doris {
#include "common/compile_check_begin.h"
using namespace ErrorCode;

bvar::Adder<uint64_t> cumu_output_size("cumu_compaction", "output_size");
Expand Down Expand Up @@ -658,5 +657,4 @@ void CloudCumulativeCompaction::do_lease() {
}
}

#include "common/compile_check_end.h"
} // namespace doris
2 changes: 0 additions & 2 deletions be/src/cloud/cloud_cumulative_compaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include "storage/compaction_task_tracker.h"

namespace doris {
#include "common/compile_check_begin.h"

class CloudCumulativeCompaction : public CloudCompactionMixin {
public:
Expand Down Expand Up @@ -69,5 +68,4 @@ class CloudCumulativeCompaction : public CloudCompactionMixin {
Version _last_delete_version {-1, -1};
};

#include "common/compile_check_end.h"
} // namespace doris
2 changes: 0 additions & 2 deletions be/src/cloud/cloud_cumulative_compaction_policy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include "util/defer_op.h"

namespace doris {
#include "common/compile_check_begin.h"

CloudSizeBasedCumulativeCompactionPolicy::CloudSizeBasedCumulativeCompactionPolicy(
int64_t promotion_size, double promotion_ratio, int64_t promotion_min_size,
Expand Down Expand Up @@ -359,5 +358,4 @@ int64_t CloudTimeSeriesCumulativeCompactionPolicy::new_cumulative_point(
return output_rowset->end_version() + 1;
}

#include "common/compile_check_end.h"
} // namespace doris
2 changes: 0 additions & 2 deletions be/src/cloud/cloud_cumulative_compaction_policy.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include "storage/rowset/rowset_meta.h"

namespace doris {
#include "common/compile_check_begin.h"

class Tablet;
struct Version;
Expand Down Expand Up @@ -131,5 +130,4 @@ class CloudTimeSeriesCumulativeCompactionPolicy : public CloudCumulativeCompacti
void find_longest_consecutive_empty_rowsets(std::vector<RowsetSharedPtr>* result,
const std::vector<RowsetSharedPtr>& candidate_rowsets);

#include "common/compile_check_end.h"
} // namespace doris
2 changes: 0 additions & 2 deletions be/src/cloud/cloud_engine_calc_delete_bitmap_task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include "storage/utils.h"

namespace doris {
#include "common/compile_check_begin.h"

CloudEngineCalcDeleteBitmapTask::CloudEngineCalcDeleteBitmapTask(
CloudStorageEngine& engine, const TCalcDeleteBitmapRequest& cal_delete_bitmap_req,
Expand Down Expand Up @@ -392,5 +391,4 @@ Status CloudTabletCalcDeleteBitmapTask::_handle_rowset(
return Status::OK();
}

#include "common/compile_check_end.h"
} // namespace doris
3 changes: 0 additions & 3 deletions be/src/cloud/cloud_internal_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@

namespace doris {
#include "common/compile_check_avoid_begin.h"
#include "common/compile_check_begin.h"

bvar::Adder<uint64_t> g_file_cache_get_by_peer_num("file_cache_get_by_peer_num");
bvar::Adder<uint64_t> g_file_cache_get_by_peer_blocks_num("file_cache_get_by_peer_blocks_num");
Expand Down Expand Up @@ -347,8 +346,6 @@ void CloudInternalServiceImpl::fetch_peer_data(google::protobuf::RpcController*
}
}

#include "common/compile_check_end.h"

bvar::Adder<uint64_t> g_file_cache_event_driven_warm_up_submitted_segment_num(
"file_cache_event_driven_warm_up_submitted_segment_num");
bvar::Adder<uint64_t> g_file_cache_event_driven_warm_up_finished_segment_num(
Expand Down
2 changes: 0 additions & 2 deletions be/src/cloud/cloud_meta_mgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
#include "util/thrift_rpc_helper.h"

namespace doris::cloud {
#include "common/compile_check_begin.h"
using namespace ErrorCode;

void* run_bthread_work(void* arg) {
Expand Down Expand Up @@ -2375,5 +2374,4 @@ Status CloudMetaMgr::get_cluster_status(
return Status::OK();
}

#include "common/compile_check_end.h"
} // namespace doris::cloud
2 changes: 0 additions & 2 deletions be/src/cloud/cloud_meta_mgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include "util/s3_util.h"

namespace doris {
#include "common/compile_check_begin.h"

class DeleteBitmap;
class StreamLoadContext;
Expand Down Expand Up @@ -206,5 +205,4 @@ class CloudMetaMgr {
};

} // namespace cloud
#include "common/compile_check_end.h"
} // namespace doris
2 changes: 0 additions & 2 deletions be/src/cloud/cloud_rowset_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include "storage/storage_policy.h"

namespace doris {
#include "common/compile_check_begin.h"
using namespace ErrorCode;

CloudRowsetBuilder::CloudRowsetBuilder(CloudStorageEngine& engine, const WriteRequest& req,
Expand Down Expand Up @@ -172,5 +171,4 @@ Status CloudRowsetBuilder::set_txn_related_info() {
}
return Status::OK();
}
#include "common/compile_check_end.h"
} // namespace doris
2 changes: 0 additions & 2 deletions be/src/cloud/cloud_snapshot_loader.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "storage/storage_policy.h"

namespace doris {
#include "common/compile_check_begin.h"

class CloudStorageEngine;

Expand Down Expand Up @@ -52,5 +51,4 @@ class CloudSnapshotLoader : public BaseSnapshotLoader {
CloudStorageEngine& _engine;
};

#include "common/compile_check_end.h"
} // end namespace doris
2 changes: 0 additions & 2 deletions be/src/cloud/cloud_snapshot_mgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
#include "util/uid_util.h"

namespace doris {
#include "common/compile_check_begin.h"
using namespace ErrorCode;

CloudSnapshotMgr::CloudSnapshotMgr(CloudStorageEngine& engine) : _engine(engine) {
Expand Down Expand Up @@ -306,5 +305,4 @@ Status CloudSnapshotMgr::_rename_index_ids(TabletSchemaPB& schema_pb,
return Status::OK();
}

#include "common/compile_check_end.h"
} // namespace doris
2 changes: 0 additions & 2 deletions be/src/cloud/cloud_storage_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
#include "util/time.h"

namespace doris {
#include "common/compile_check_begin.h"

using namespace std::literals;

Expand Down Expand Up @@ -1454,5 +1453,4 @@ Status CloudStorageEngine::set_cluster_id(int32_t cluster_id) {
return Status::OK();
}

#include "common/compile_check_end.h"
} // namespace doris
3 changes: 0 additions & 3 deletions be/src/cloud/cloud_tablet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
#include "util/stack_util.h"

namespace doris {
#include "common/compile_check_begin.h"
using namespace ErrorCode;

bvar::LatencyRecorder g_cu_compaction_get_delete_bitmap_lock_time_ms(
Expand Down Expand Up @@ -2033,6 +2032,4 @@ void CloudTablet::apply_visible_pending_rowsets() {
}
}

#include "common/compile_check_end.h"

} // namespace doris
2 changes: 0 additions & 2 deletions be/src/cloud/cloud_tablets_channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include "load/delta_writer/delta_writer.h"

namespace doris {
#include "common/compile_check_begin.h"

CloudTabletsChannel::CloudTabletsChannel(CloudStorageEngine& engine, const TabletsChannelKey& key,
const UniqueId& load_id, bool is_high_priority,
Expand Down Expand Up @@ -277,5 +276,4 @@ Status CloudTabletsChannel::close(LoadChannel* parent, const PTabletWriterAddBlo
return Status::OK();
}

#include "common/compile_check_end.h"
} // namespace doris
2 changes: 0 additions & 2 deletions be/src/cloud/cloud_warm_up_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
#include "util/time.h"

namespace doris {
#include "common/compile_check_begin.h"

bvar::Adder<uint64_t> g_file_cache_event_driven_warm_up_skipped_rowset_num(
"file_cache_event_driven_warm_up_skipped_rowset_num");
Expand Down Expand Up @@ -908,5 +907,4 @@ CloudWarmUpManager::get_all_balanced_tablets() const {
return result;
}

#include "common/compile_check_end.h"
} // namespace doris
2 changes: 0 additions & 2 deletions be/src/cloud/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "common/status.h"

namespace doris::config {
#include "common/compile_check_begin.h"

DEFINE_String(deploy_mode, "");
DEFINE_mString(cloud_unique_id, "");
Expand Down Expand Up @@ -173,5 +172,4 @@ DEFINE_mInt64(cache_read_from_peer_expired_seconds, "-1");
DEFINE_mBool(enable_file_cache_write_base_compaction_index_only, "false");
DEFINE_mBool(enable_file_cache_write_cumu_compaction_index_only, "false");

#include "common/compile_check_end.h"
} // namespace doris::config
2 changes: 0 additions & 2 deletions be/src/cloud/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "common/config.h"

namespace doris::config {
#include "common/compile_check_begin.h"

DECLARE_String(deploy_mode);
// deprecated do not configure directly
Expand Down Expand Up @@ -216,5 +215,4 @@ DECLARE_mBool(enable_file_cache_write_base_compaction_index_only);
// Cumulative compaction output: only write index files to file cache, not data files
DECLARE_mBool(enable_file_cache_write_cumu_compaction_index_only);

#include "common/compile_check_end.h"
} // namespace doris::config
2 changes: 0 additions & 2 deletions be/src/cloud/delete_bitmap_file_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include "util/coding.h"

namespace doris {
#include "common/compile_check_begin.h"

DeleteBitmapFileReader::DeleteBitmapFileReader(int64_t tablet_id, const std::string& rowset_id,
std::optional<StorageResource>& storage_resource)
Expand Down Expand Up @@ -159,5 +158,4 @@ Status DeleteBitmapFileReader::read(DeleteBitmapPB& delete_bitmap) {
return Status::OK();
}

#include "common/compile_check_end.h"
} // namespace doris
2 changes: 0 additions & 2 deletions be/src/cloud/delete_bitmap_file_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include "io/fs/packed_file_writer.h"

namespace doris {
#include "common/compile_check_begin.h"

DeleteBitmapFileWriter::DeleteBitmapFileWriter(int64_t tablet_id, const std::string& rowset_id,
std::optional<StorageResource>& storage_resource)
Expand Down Expand Up @@ -151,5 +150,4 @@ Status DeleteBitmapFileWriter::write(const DeleteBitmapPB& delete_bitmap) {
return Status::OK();
}

#include "common/compile_check_end.h"
} // namespace doris
2 changes: 0 additions & 2 deletions be/src/cloud/pb_convert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include "common/logging.h"

namespace doris::cloud {
#include "common/compile_check_begin.h"

RowsetMetaCloudPB doris_rowset_meta_to_cloud(const RowsetMetaPB& in) {
RowsetMetaCloudPB out;
Expand Down Expand Up @@ -918,6 +917,5 @@ void cloud_tablet_meta_to_doris(TabletMetaPB* out, TabletMetaCloudPB&& in) {
out->set_encryption_algorithm(in.encryption_algorithm());
}
}
#include "common/compile_check_end.h"

} // namespace doris::cloud
7 changes: 4 additions & 3 deletions be/src/common/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@

## compile_check Mechanism

`compile_check_begin.h` / `compile_check_end.h` raise conversion warnings to errors.
Conversion warnings are raised to errors globally. Only
`compile_check_avoid_begin.h` / `compile_check_avoid_end.h` remain for the
small number of legacy code blocks that still need a local bypass.

### Checkpoints

- [ ] New declaration-heavy headers use paired `compile_check_begin.h` / `compile_check_end.h` matching neighbors?
- [ ] Narrowing conversions avoided (`int64_t→int32_t`, `size_t→int`, `uint64_t→int64_t`)?
- [ ] Third-party bypass uses `compile_check_avoid_begin.h` / `compile_check_avoid_end.h`, not local weakening?
- [ ] Local bypasses stay minimal and use paired `compile_check_avoid_begin.h` / `compile_check_avoid_end.h` instead of weakening warnings more broadly?
2 changes: 0 additions & 2 deletions be/src/common/be_mock_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <vector>

namespace doris {
#include "common/compile_check_begin.h"
void mock_random_sleep() {
std::vector<int> sleepDurations = {0, 0, 0, 0, 50};
std::random_device rd;
Expand All @@ -34,4 +33,3 @@ void mock_random_sleep() {
std::this_thread::sleep_for(std::chrono::milliseconds(sleepTime));
}
} // namespace doris
#include "common/compile_check_end.h"
Loading
Loading