Skip to content

Commit ca3eec7

Browse files
committed
Extra logging for test
1 parent c6fa4a8 commit ca3eec7

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ jobs:
175175
EOF
176176
177177
gdb -ix ./init.gdb --batch -ex r --args ./dragonfly_test --force_epoll
178-
GLOG_alsologtostderr=1 FLAGS_fiber_safety_margin=4096 FLAGS_force_epoll=true GLOG_vmodule=rdb_load=1,rdb_save=1,snapshot=1 \
178+
GLOG_alsologtostderr=1 FLAGS_fiber_safety_margin=4096 FLAGS_force_epoll=true GLOG_vmodule=rdb_load=1,rdb_save=1,snapshot=1,engine_shard=1 \
179179
timeout 20m ctest -V -L DFLY -E allocation_tracker_test
180180
181181
FLAGS_fiber_safety_margin=4096 FLAGS_force_epoll=true timeout 5m ./allocation_tracker_test

src/server/engine_shard.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,8 @@ size_t EngineShard::CalculateEvictionBytes() {
726726
const double rss_oom_deny_ratio = ServerState::tlocal()->rss_oom_deny_ratio > 0.
727727
? std::min(ServerState::tlocal()->rss_oom_deny_ratio, 1.)
728728
: 1.;
729+
LOG(INFO) << "rss_oom_deny_ratio " << rss_oom_deny_ratio << " max_memory_limit"
730+
<< max_memory_limit;
729731
// Check for `enable_heartbeat_rss_eviction` flag since it dynamic. And reset state
730732
// if flag has changed.
731733
bool rss_eviction_enabled_flag = GetFlag(FLAGS_enable_heartbeat_rss_eviction);

src/server/rdb_test.cc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ ABSL_DECLARE_FLAG(int32, list_max_listpack_size);
3535
ABSL_DECLARE_FLAG(dfly::CompressionMode, compression_mode);
3636
ABSL_DECLARE_FLAG(bool, rdb_ignore_expiry);
3737
ABSL_DECLARE_FLAG(uint32_t, num_shards);
38+
ABSL_DECLARE_FLAG(bool, enable_heartbeat_rss_eviction);
3839

3940
namespace dfly {
4041

@@ -588,7 +589,9 @@ class HllRdbTest : public RdbTest, public testing::WithParamInterface<string> {}
588589

589590
TEST_P(HllRdbTest, Hll) {
590591
LOG(INFO) << " max memory: " << max_memory_limit
591-
<< " used_mem_current: " << used_mem_current.load();
592+
<< " used_mem_current: " << used_mem_current.load()
593+
<< " enable:" << absl::GetFlag(FLAGS_enable_heartbeat_rss_eviction);
594+
592595
auto ec = LoadRdb("hll.rdb");
593596

594597
ASSERT_FALSE(ec) << ec.message();
@@ -603,7 +606,11 @@ TEST_P(HllRdbTest, Hll) {
603606
EXPECT_EQ(CheckedInt({"pfadd", GetParam(), "2"}), 1);
604607
EXPECT_EQ(CheckedInt({"pfcount", GetParam()}), 2);
605608

609+
LOG(INFO) << " max memory: " << max_memory_limit
610+
<< " used_mem_current: " << used_mem_current.load();
611+
606612
EXPECT_EQ(Run({"pfmerge", "key3", GetParam(), "key2"}), "OK");
613+
607614
EXPECT_EQ(CheckedInt({"pfcount", "key3"}), 2);
608615
}
609616

0 commit comments

Comments
 (0)