Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split util.h to more concrete util headers #1144

Merged
merged 1 commit into from
Nov 26, 2022
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/cluster/cluster.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
#include "parse_util.h"
#include "replication.h"
#include "server/server.h"
#include "util.h"
#include "string_util.h"
#include "time_util.h"

const char *errInvalidNodeID = "Invalid cluster node id";
const char *errInvalidSlotID = "Invalid slot id";
Expand Down
2 changes: 0 additions & 2 deletions src/cluster/redis_slot.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
#include <cstdlib>
#include <string>

#include "util.h"

static const uint16_t crc16tab[256] = {
0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, 0x60c6, 0x70e7, 0x8108, 0x9129, 0xa14a, 0xb16b, 0xc18c, 0xd1ad,
0xe1ce, 0xf1ef, 0x1231, 0x0210, 0x3273, 0x2252, 0x52b5, 0x4294, 0x72f7, 0x62d6, 0x9339, 0x8318, 0xb37b, 0xa35a,
Expand Down
3 changes: 2 additions & 1 deletion src/cluster/replication.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@
#include "event_util.h"
#include "fd_util.h"
#include "fmt/format.h"
#include "io_util.h"
#include "rocksdb_crc32c.h"
#include "server/redis_reply.h"
#include "server/server.h"
#include "status.h"
#include "storage/batch_debugger.h"
#include "util.h"
#include "thread_util.h"

Status FeedSlaveThread::Start() {
try {
Expand Down
3 changes: 3 additions & 0 deletions src/cluster/slot_migrate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@

#include "event_util.h"
#include "fmt/format.h"
#include "io_util.h"
#include "storage/batch_extractor.h"
#include "thread_util.h"
#include "time_util.h"

static std::map<RedisType, std::string> type_to_cmd = {
{kRedisString, "set"}, {kRedisList, "rpush"}, {kRedisHash, "hmset"}, {kRedisSet, "sadd"},
Expand Down
1 change: 0 additions & 1 deletion src/cluster/slot_migrate.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
#include "stats/stats.h"
#include "status.h"
#include "storage/redis_db.h"
#include "util.h"

constexpr const auto CLUSTER_SLOTS = HASH_SLOTS_SIZE;

Expand Down
2 changes: 1 addition & 1 deletion src/commands/command_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

#include "parse_util.h"
#include "status.h"
#include "util.h"
#include "string_util.h"

template <typename Iter>
struct MoveIterator : Iter {
Expand Down
4 changes: 3 additions & 1 deletion src/commands/redis_cmd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include "cluster/slot_migrate.h"
#include "command_parser.h"
#include "fd_util.h"
#include "io_util.h"
#include "parse_util.h"
#include "server/redis_connection.h"
#include "server/redis_reply.h"
Expand All @@ -49,6 +50,8 @@
#include "storage/redis_pubsub.h"
#include "storage/scripting.h"
#include "storage/storage.h"
#include "thread_util.h"
#include "time_util.h"
#include "types/redis_bitmap.h"
#include "types/redis_geo.h"
#include "types/redis_hash.h"
Expand All @@ -58,7 +61,6 @@
#include "types/redis_stream.h"
#include "types/redis_string.h"
#include "types/redis_zset.h"
#include "util.h"

namespace Redis {

Expand Down
Loading