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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,17 @@ jobs:
run: |
git config --global --add safe.directory '*'
cd $GITHUB_WORKSPACE

# Derive branch name from tag: 1.2.2 -> rel_1_2_2_eloqkv
REL_BRANCH="rel_$(echo "${{ inputs.tag_name }}" | sed 's/^v//' | tr '.' '_')_eloqkv"
Comment thread
thweetkomputer marked this conversation as resolved.

git clone --recurse-submodules git@github.com:eloqdata/eloq_log_service.git logservice_src
git -C logservice_src checkout $REL_BRANCH
git -C logservice_src submodule update --recursive
Comment thread
thweetkomputer marked this conversation as resolved.

git clone git@github.com:eloqdata/raft_host_manager.git raft_host_manager_src
git -C raft_host_manager_src checkout $REL_BRANCH
git -C raft_host_manager_src submodule update --recursive

rm -rf eloqkv_src/data_substrate/eloq_log_service
rm -rf eloqkv_src/data_substrate/tx_service/raft_host_manager
Expand Down
156 changes: 0 additions & 156 deletions .github/workflows/test-build.yml

This file was deleted.

34 changes: 34 additions & 0 deletions include/redis_command.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@
#define SLOWLOG_RESET (1 << 1)
#define SLOWLOG_LEN (1 << 2)

#if defined(DATA_STORE_TYPE_ELOQDSS_ROCKSDB_CLOUD_S3) || \
defined(DATA_STORE_TYPE_ELOQDSS_ROCKSDB_CLOUD_GCS)
#define ELOQKV_WITH_DSS_ROCKSDB_CLOUD 1
#endif

namespace EloqKV
{
enum struct RedisCommandType
Expand Down Expand Up @@ -320,6 +325,9 @@ enum struct RedisCommandType
#endif

UNLINK,
#ifdef ELOQKV_WITH_DSS_ROCKSDB_CLOUD
COMPACT,
#endif
};

enum RedisResultType
Expand Down Expand Up @@ -800,6 +808,9 @@ struct InfoCommand : public DirectCommand
int64_t data_memory_committed_{0};
uint64_t last_ckpt_ts_{0};
int event_dispatcher_num_{0};
std::string os_info_;
std::string executable_path_;
int64_t total_system_memory_kb_{0};
const char *version_{nullptr};

int64_t conn_received_count_{0};
Expand All @@ -813,7 +824,23 @@ struct InfoCommand : public DirectCommand
int64_t cmds_per_sec_{0};
double cmd_latency_{0};
std::vector<int64_t> dbsizes_;
#ifdef ELOQKV_WITH_DSS_ROCKSDB_CLOUD
uint64_t store_disk_keys_{0};
#endif
};

#ifdef ELOQKV_WITH_DSS_ROCKSDB_CLOUD
struct CompactCommand : public DirectCommand
{
CompactCommand() = default;

void Execute(RedisServiceImpl *redis_impl,
RedisConnectionContext *ctx) override;
void OutputResult(OutputHandler *reply) const override;

bool success_{false};
};
#endif

struct CommandCommand : public DirectCommand
{
Expand Down Expand Up @@ -7223,7 +7250,9 @@ struct DumpCommand : public RedisCommand

RedisStringResult result_;

// Retained for accepting payloads produced before Redis DUMP compatibility.
static constexpr inline uint16_t dump_version_{0};
static constexpr inline uint16_t redis_dump_version_{10};
};

struct RestoreCommand : public RedisCommand
Expand Down Expand Up @@ -7829,6 +7858,11 @@ std::tuple<bool, ConfigCommand> ParseConfigCommand(
std::tuple<bool, InfoCommand> ParseInfoCommand(
const std::vector<std::string_view> &args, OutputHandler *output);

#ifdef ELOQKV_WITH_DSS_ROCKSDB_CLOUD
std::tuple<bool, CompactCommand> ParseCompactCommand(
const std::vector<std::string_view> &args, OutputHandler *output);
#endif

std::tuple<bool, std::unique_ptr<CommandCommand>> ParseCommandCommand(
const std::vector<std::string_view> &args, OutputHandler *output);

Expand Down
20 changes: 20 additions & 0 deletions include/redis_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,26 @@ class InfoCommandHandler : public RedisCommandHandler
RedisServiceImpl *redis_impl_;
};

#ifdef ELOQKV_WITH_DSS_ROCKSDB_CLOUD
class CompactCommandHandler : public RedisCommandHandler
{
public:
explicit CompactCommandHandler(RedisServiceImpl *redis_impl)
: redis_impl_(redis_impl)
{
}

brpc::RedisCommandHandlerResult Run(
RedisConnectionContext *ctx,
const std::vector<butil::StringPiece> &args,
brpc::RedisReply *output,
bool /*flush_batched*/) override;

private:
RedisServiceImpl *redis_impl_;
};
#endif

class CommandCommandHandler : public RedisCommandHandler
{
public:
Expand Down
5 changes: 5 additions & 0 deletions include/redis_rdb_restore.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

namespace EloqKV
{
struct RedisEloqObject;

enum class RestorePayloadFormat
{
EloqKV,
Expand All @@ -13,4 +15,7 @@ enum class RestorePayloadFormat

bool ConvertRedisDumpPayloadToEloqPayload(std::string_view dump_payload,
std::string &eloq_payload);

bool ConvertEloqObjectToRedisDumpPayload(const RedisEloqObject &object,
std::string &dump_payload);
} // namespace EloqKV
20 changes: 20 additions & 0 deletions include/redis_service.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,11 @@ class RedisServiceImpl : public brpc::RedisService
const std::vector<butil::StringPiece> &args,
brpc::RedisReply *output);

store::DataStoreHandler *GetStoreHandler() const
{
return store_hd_;
}

void GenericCommand(RedisConnectionContext *ctx,
TransactionExecution *txm,
const std::vector<std::string> &cmd_arg_list,
Expand Down Expand Up @@ -470,6 +475,18 @@ class RedisServiceImpl : public brpc::RedisService
{
return event_dispatcher_num_;
}
const std::string &GetOsInfo() const
{
return os_info_;
}
const std::string &GetExecutablePath() const
{
return executable_path_;
}
int64_t GetTotalSystemMemoryKB() const
{
return total_system_memory_kb_;
}
TxService *GetTxService()
{
return tx_service_;
Expand Down Expand Up @@ -570,6 +587,9 @@ class RedisServiceImpl : public brpc::RedisService
std::string config_file_;
uint32_t node_memory_limit_mb_;
int event_dispatcher_num_;
std::string os_info_;
std::string executable_path_;
int64_t total_system_memory_kb_{0};
const char *version_;
// Isolation level and concurrency control protocol of MULTI/EXEC or lua
// transactions. ReadCommitted and OccRead are always used for simple
Expand Down
Loading
Loading