Skip to content

Commit

Permalink
fix:cache_disable_flag assign initial value (OpenAtomFoundation#2613)
Browse files Browse the repository at this point in the history
* fix:cache_disable_flag assign initial value


---------

Co-authored-by: chejinge <chejinge@360.cn>
  • Loading branch information
2 people authored and cjh committed Apr 20, 2024
1 parent 4f9aa83 commit a883b4d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
30 changes: 15 additions & 15 deletions include/pika_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -899,21 +899,21 @@ class PikaConf : public pstd::BaseConf {

// cache
std::vector<std::string> cache_type_;
std::atomic_bool tmp_cache_disable_flag_;
std::atomic_int64_t cache_maxmemory_;
std::atomic_int cache_num_;
std::atomic_int cache_mode_;
std::atomic_int cache_string_;
std::atomic_int cache_set_;
std::atomic_int cache_zset_;
std::atomic_int cache_hash_;
std::atomic_int cache_list_;
std::atomic_int cache_bit_;
std::atomic_int zset_cache_start_direction_;
std::atomic_int zset_cache_field_num_per_key_;
std::atomic_int cache_maxmemory_policy_;
std::atomic_int cache_maxmemory_samples_;
std::atomic_int cache_lfu_decay_time_;
std::atomic_bool tmp_cache_disable_flag_ = false;
std::atomic_int64_t cache_maxmemory_ = 10737418240;
std::atomic_int cache_num_ = 5;
std::atomic_int cache_mode_ = 1;
std::atomic_int cache_string_ = 1;
std::atomic_int cache_set_ = 1;
std::atomic_int cache_zset_ = 1;
std::atomic_int cache_hash_ = 1;
std::atomic_int cache_list_ = 1;
std::atomic_int cache_bit_ = 1;
std::atomic_int zset_cache_start_direction_ = 0;
std::atomic_int zset_cache_field_num_per_key_ = 512;
std::atomic_int cache_maxmemory_policy_ = 1;
std::atomic_int cache_maxmemory_samples_ = 5;
std::atomic_int cache_lfu_decay_time_ = 1;

// rocksdb blob
bool enable_blob_files_ = false;
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/txn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ var _ = Describe("Text Txn", func() {
}(&cmdCost)
<-resultChann
wg.Wait()
Expect(cmdCost < (txnCost / 4)).To(BeTrue())
Expect(cmdCost < (txnCost / 2)).To(BeTrue())
})
})

Expand Down

0 comments on commit a883b4d

Please sign in to comment.