@@ -160,6 +160,23 @@ class PikaConf : public pstd::BaseConf {
160160 std::shared_lock l (rwlock_);
161161 return binlog_writer_num_;
162162 }
163+ // big keys
164+ int bigkeys_show_limit () {
165+ std::shared_lock l (rwlock_);
166+ return bigkeys_show_limit_;
167+ }
168+ int bigkeys_member_threshold () {
169+ std::shared_lock l (rwlock_);
170+ return bigkeys_member_threshold_;
171+ }
172+ int bigkeys_key_value_length_threshold () {
173+ std::shared_lock l (rwlock_);
174+ return bigkeys_key_value_length_threshold_;
175+ }
176+ int bigkeys_log_interval () {
177+ std::shared_lock l (rwlock_);
178+ return bigkeys_log_interval_;
179+ }
163180 bool slotmigrate () {
164181 std::shared_lock l (rwlock_);
165182 return slotmigrate_;
@@ -729,7 +746,23 @@ class PikaConf : public pstd::BaseConf {
729746 log_net_activities_.store (false );
730747 }
731748 }
732-
749+ // big keys
750+ void SetBigkeysShowLimit (const int value) {
751+ std::lock_guard l (rwlock_);
752+ bigkeys_show_limit_ = value;
753+ }
754+ void SetBigkeysKeyValueLengthThreshold (const int value) {
755+ std::lock_guard l (rwlock_);
756+ bigkeys_key_value_length_threshold_ = value;
757+ }
758+ void SetBigkeysMemberCountThreshold (const int value) {
759+ std::lock_guard l (rwlock_);
760+ bigkeys_member_threshold_ = value;
761+ }
762+ void SetBigkeysLogInterval (const int value) {
763+ std::lock_guard l (rwlock_);
764+ bigkeys_log_interval_ = value;
765+ }
733766 // Rsync Rate limiting configuration
734767 void SetThrottleBytesPerSecond (const int value) {
735768 std::lock_guard l (rwlock_);
@@ -895,6 +928,11 @@ class PikaConf : public pstd::BaseConf {
895928 int thread_pool_size_ = 0 ;
896929 int slow_cmd_thread_pool_size_ = 0 ;
897930 int admin_thread_pool_size_ = 0 ;
931+ // big keys
932+ int bigkeys_show_limit_ = 10 ;
933+ int bigkeys_member_threshold_ = 10000 ;
934+ int bigkeys_key_value_length_threshold_ = 1048576 ;
935+ int bigkeys_log_interval_ = 60 ;
898936 std::unordered_set<std::string> slow_cmd_set_;
899937 // Because the exporter of Pika_exporter implements Auth authentication
900938 // with the Exporter of Pika, and the Exporter authenticates the Auth when
0 commit comments