check integration test

This commit is contained in:
Han Fei 2023-11-28 10:47:22 +01:00
parent 8e1b61cc13
commit 3aa4a6ae2c
2 changed files with 6 additions and 2 deletions

View File

@ -138,6 +138,7 @@ void KeeperDispatcher::requestThread()
Int64 mem_soft_limit = configuration_and_settings->coordination_settings->max_memory_usage_soft_limit;
if (configuration_and_settings->standalone_keeper && mem_soft_limit > 0 && total_memory_tracker.get() >= mem_soft_limit && !checkIfRequestIncreaseMem(request.request))
{
LOG_TRACE(log, "Processing requests refused because of mem_soft_limit {}, request type is {}", mem_soft_limit, request.request->getOpNum());
addErrorResponses({request}, Coordination::Error::ZCONNECTIONLOSS);
continue;
}

View File

@ -46,15 +46,18 @@ def test_soft_limit_create(started_cluster):
try:
node_zk = get_connection_zk("node")
loop_time = 1000000
node_zk.create("/test_soft_limit", b"abc")
for i in range(loop_time):
node_zk.create("/test_soft_limit/node_" + str(i), random_string(100))
node_zk.create(
"/test_soft_limit/node_" + str(i), random_string(100).encode()
)
except ConnectionLoss:
txn = node_zk.transaction()
for i in range(10):
txn.delete("/test_soft_limit/node_" + str(i))
txn.create("/test_soft_limit/node_1000001" + str(i), "abcde")
txn.create("/test_soft_limit/node_1000001" + str(i), b"abcde")
txn.commit()
return