aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/documentdb/executor_threading_service
diff options
context:
space:
mode:
authorGeir Storli <geirst@verizonmedia.com>2021-11-17 15:56:28 +0000
committerGeir Storli <geirst@verizonmedia.com>2021-11-17 15:59:16 +0000
commitcb193f15ffd443cdb370a43e97712bd4b4b83edf (patch)
tree389b23f151082b1f45ef3a5c70614b613032d407 /searchcore/src/tests/proton/documentdb/executor_threading_service
parent65fe0e9b45b10e9b3663a729969473d84f3b5edd (diff)
Add support for blocking external feed operations when the document db master thread has reached its task limit.
Turning this functionality on/off is controlled by proton config (default off).
Diffstat (limited to 'searchcore/src/tests/proton/documentdb/executor_threading_service')
-rw-r--r--searchcore/src/tests/proton/documentdb/executor_threading_service/executor_threading_service_test.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/searchcore/src/tests/proton/documentdb/executor_threading_service/executor_threading_service_test.cpp b/searchcore/src/tests/proton/documentdb/executor_threading_service/executor_threading_service_test.cpp
index 714ffaa16b7..32707f8a69f 100644
--- a/searchcore/src/tests/proton/documentdb/executor_threading_service/executor_threading_service_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/executor_threading_service/executor_threading_service_test.cpp
@@ -75,5 +75,17 @@ TEST_F(ExecutorThreadingServiceTest, shared_executor_for_index_and_attribute_fie
assert_executor(index_inverter(), 12, 100);
}
+TEST_F(ExecutorThreadingServiceTest, tasks_limits_can_be_updated)
+{
+ setup(4, SharedFieldWriterExecutor::NONE);
+ service->set_task_limits(5, 7, 11);
+ EXPECT_EQ(5, service->master_task_limit());
+ EXPECT_EQ(7, service->index().getTaskLimit());
+ EXPECT_EQ(11, service->summary().getTaskLimit());
+ EXPECT_EQ(7, index_inverter()->first_executor()->getTaskLimit());
+ EXPECT_EQ(7, index_writer()->first_executor()->getTaskLimit());
+ EXPECT_EQ(7, attribute_writer()->first_executor()->getTaskLimit());
+}
+
GTEST_MAIN_RUN_ALL_TESTS()