Skip to content

Commit d3eafe0

Browse files
authored
Delete the print of the inconsequential log (#3119)
1 parent 9018370 commit d3eafe0

2 files changed

Lines changed: 0 additions & 9 deletions

File tree

src/pika_cache_load_thread.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ bool PikaCacheLoadThread::LoadKV(std::string& key, const std::shared_ptr<DB>& db
5959
int64_t ttl = -1;
6060
rocksdb::Status s = db->storage()->GetWithTTL(key, &value, &ttl);
6161
if (!s.ok() || key.size() > g_pika_conf->max_key_size_in_cache()) {
62-
LOG(WARNING) << "load kv failed, key=" << key;
6362
return false;
6463
}
6564
std::string CachePrefixKeyK = PCacheKeyPrefixK + key;
@@ -94,8 +93,6 @@ bool PikaCacheLoadThread::LoadList(std::string& key, const std::shared_ptr<DB>&
9493
// If the List type contains more than 2048 data members,
9594
// it will not be updated to RedisCache
9695
if (len <= 0 || g_pika_conf->value_item_max_size_in_cache() < len || key.size() > g_pika_conf->max_key_size_in_cache()) {
97-
LOG(WARNING) << "can not load key, because item size:" << len
98-
<< " beyond max item size:" << g_pika_conf->value_item_max_size_in_cache();
9996
return false;
10097
}
10198

@@ -117,8 +114,6 @@ bool PikaCacheLoadThread::LoadSet(std::string& key, const std::shared_ptr<DB>& d
117114
// If the Set type contains more than 2048 data members,
118115
// it will not be updated to RedisCache
119116
if (0 >= len || g_pika_conf->value_item_max_size_in_cache() < len || key.size() > g_pika_conf->max_key_size_in_cache()) {
120-
LOG(WARNING) << "can not load key, because item size:" << len
121-
<< " beyond max item size:" << g_pika_conf->value_item_max_size_in_cache();
122117
return false;
123118
}
124119

src/pika_conf.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -614,17 +614,13 @@ int PikaConf::Load() {
614614
GetConfInt("cache-value-item-max-size", &cache_value_item_max_size);
615615
if (cache_value_item_max_size <= 0) {
616616
cache_value_item_max_size = DEFAULT_CACHE_ITEMS_SIZE;
617-
} else if (cache_value_item_max_size > MAX_CACHE_ITEMS_SIZE) {
618-
cache_value_item_max_size = MAX_CACHE_ITEMS_SIZE;
619617
}
620618
cache_value_item_max_size_ = cache_value_item_max_size;
621619

622620
int max_key_size_in_cache = DEFAULT_CACHE_MAX_KEY_SIZE;
623621
GetConfInt("max-key-size-in-cache", &max_key_size_in_cache);
624622
if (max_key_size_in_cache <= 0) {
625623
max_key_size_in_cache = DEFAULT_CACHE_MAX_KEY_SIZE;
626-
} else if (max_key_size_in_cache > MAX_CACHE_MAX_KEY_SIZE) {
627-
max_key_size_in_cache = MAX_CACHE_MAX_KEY_SIZE;
628624
}
629625
max_key_size_in_cache_ = max_key_size_in_cache;
630626

0 commit comments

Comments
 (0)