Skip to content

Commit

Permalink
Put const value under macro COMPATIBLE_MODE_ZOOKEEPER
Browse files Browse the repository at this point in the history
  • Loading branch information
lzydmxy authored and JackyWoo committed Jun 13, 2024
1 parent cca5c1c commit 4442a51
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions src/Service/KeeperCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,22 @@ namespace RK
using RunnerId = size_t;
using ThreadPoolPtr = std::shared_ptr<ThreadPool>;

const String CLICKHOUSE_KEEPER_SYSTEM_PATH = "/keeper";
const String CLICKHOUSE_KEEPER_API_VERSION_PATH = CLICKHOUSE_KEEPER_SYSTEM_PATH + "/api_version";

enum class KeeperApiVersion : uint8_t
{
ZOOKEEPER_COMPATIBLE = 0,
WITH_FILTERED_LIST,
WITH_MULTI_READ
};

inline constexpr auto CURRENT_KEEPER_API_VERSION = KeeperApiVersion::WITH_MULTI_READ;

const String ZOOKEEPER_SYSTEM_PATH= "/zookeeper";
const String ZOOKEEPER_CONFIG_NODE= ZOOKEEPER_SYSTEM_PATH + "/config";
#ifdef COMPATIBLE_MODE_ZOOKEEPER
const String ZOOKEEPER_SYSTEM_PATH = "/zookeeper";
const String ZOOKEEPER_CONFIG_NODE = ZOOKEEPER_SYSTEM_PATH + "/config";
#else
const String CLICKHOUSE_KEEPER_SYSTEM_PATH = "/keeper";
const String CLICKHOUSE_KEEPER_API_VERSION_PATH = CLICKHOUSE_KEEPER_SYSTEM_PATH + "/api_version";

enum class KeeperApiVersion : uint8_t
{
ZOOKEEPER_COMPATIBLE = 0,
WITH_FILTERED_LIST,
WITH_MULTI_READ
};

inline constexpr auto CURRENT_KEEPER_API_VERSION = KeeperApiVersion::WITH_MULTI_READ;
#endif

struct RequestId;

Expand Down

0 comments on commit 4442a51

Please sign in to comment.