Skip to content

Commit c009246

Browse files
authored
*: Simplify Server.cpp (#9804)
ref #6233 Simplify Server.cpp * Reduce parsing `DisaggregatedMode` for multiple times * Add `Setup.cpp` for setting up the SIMD and jemalloc/mimalloc settings * Add `TCPServersHolder.cpp` * Rename `TcpHttpServersHolder` to `TCPServersHolder` because we never create http server in TiFlash now * Merge TCPHandlerFactory into `TCPServersHolder.cpp` * Remove some useless config inherited from Clickhouse * Remove `display_name`, always show "TiFlash" for TCP connections * Remove `default_database`, always use "system" for TCP connections * Remove `max_concurrent_queries`, no limitation for the number of queries in process list * Remove `listen_try` in `TCPServersHolder` * Remove `tcp_port_secure` in `TCPServersHolder`
1 parent a381c31 commit c009246

15 files changed

+576
-503
lines changed

dbms/src/Common/Logger_fwd.h

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Copyright 2025 PingCAP, Inc.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
#pragma once
16+
17+
#include <memory>
18+
19+
namespace DB
20+
{
21+
class Logger;
22+
using LoggerPtr = std::shared_ptr<Logger>;
23+
24+
} // namespace DB

dbms/src/Flash/Management/ManualCompact.h

-2
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,9 @@
2727
#include <kvproto/tikvpb.pb.h>
2828
#pragma GCC diagnostic pop
2929

30-
#include <atomic>
3130
#include <boost/noncopyable.hpp>
3231
#include <cstddef>
3332
#include <memory>
34-
#include <set>
3533

3634
namespace DB
3735
{

dbms/src/Server/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ add_library (tiflash-server-lib
4343
Server.cpp
4444
StatusFile.cpp
4545
TCPHandler.cpp
46+
TCPServersHolder.cpp
4647
BgStorageInit.cpp
4748
Bootstrap.cpp
49+
Setup.cpp
4850
StorageConfigParser.cpp
4951
UserConfigParser.cpp
5052
RaftConfigParser.cpp)

dbms/src/Server/InterruptListener.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class InterruptListener
6666
{
6767
private:
6868
bool active;
69-
sigset_t sig_set;
69+
sigset_t sig_set{};
7070

7171
public:
7272
InterruptListener()

dbms/src/Server/MockComputeClient.h

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
#include <coprocessor.pb.h>
1919
#include <fmt/core.h>
2020
#include <kvproto/tikvpb.grpc.pb.h>
21+
22+
#include <magic_enum.hpp>
23+
2124
using grpc::Channel;
2225
using grpc::Status;
2326

0 commit comments

Comments
 (0)