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

fix: disable rpoplpush when cache mode is enabled with list structure #2960

Closed
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
2 changes: 1 addition & 1 deletion include/pika_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -1102,7 +1102,7 @@ class PikaConf : public pstd::BaseConf {
int64_t min_blob_size_ = 4096; // 4K
int64_t blob_cache_ = 0;
int64_t blob_num_shard_bits_ = 0;
int64_t blob_file_size_ = 256 * 1024 * 1024; // 256M
int64_t blob_file_size_ = 256 << 20; // 256M
std::string blob_compression_type_ = "none";

std::shared_mutex rwlock_;
Expand Down
6 changes: 4 additions & 2 deletions src/pika_list.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@
#include <utility>
#include "include/pika_cache.h"
#include "include/pika_data_distribution.h"
#include "include/pika_rm.h"
#include "include/pika_server.h"
#include "include/pika_slot_command.h"
#include "pstd/include/pstd_string.h"
#include "scope_record_lock.h"

extern PikaServer* g_pika_server;
extern std::unique_ptr<PikaReplicaManager> g_pika_rm;

void LIndexCmd::DoInitial() {
if (!CheckArg(argv_.size())) {
Expand Down Expand Up @@ -786,6 +784,10 @@ void RPopCmd::DoUpdateCache() {
}

void RPopLPushCmd::DoInitial() {
if (PIKA_CACHE_NONE != g_pika_conf->cache_mode() && g_pika_conf->GetCacheList()) {
res_.SetRes(CmdRes::kErrOther, "the command is not supported when cache&list is enabled");
return;
}
if (!CheckArg(argv_.size())) {
res_.SetRes(CmdRes::kWrongNum, kCmdNameRPopLPush);
return;
Expand Down
Loading