This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new bb71401 Require at least one ET_TASK thread
bb71401 is described below
commit bb71401079ab9df73affefb7db61e559adeab9c8
Author: Leif Hedstrom <[email protected]>
AuthorDate: Thu May 25 20:07:25 2017 -0600
Require at least one ET_TASK thread
---
doc/admin-guide/files/records.config.en.rst | 3 ++-
iocore/eventsystem/Tasks.cc | 4 +---
mgmt/RecordsConfig.cc | 2 +-
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/doc/admin-guide/files/records.config.en.rst
b/doc/admin-guide/files/records.config.en.rst
index 706dc64..efb3492 100644
--- a/doc/admin-guide/files/records.config.en.rst
+++ b/doc/admin-guide/files/records.config.en.rst
@@ -3648,7 +3648,8 @@ Sockets
.. ts:cv:: CONFIG proxy.config.task_threads INT 2
Specifies the number of task threads to run. These threads are used for
- various tasks that should be off-loaded from the normal network threads.
+ various tasks that should be off-loaded from the normal network
+ threads. You must have at least one task thread available.
.. ts:cv:: CONFIG proxy.config.allocator.thread_freelist_size INT 512
diff --git a/iocore/eventsystem/Tasks.cc b/iocore/eventsystem/Tasks.cc
index 58dc1ef..63ff8ff 100644
--- a/iocore/eventsystem/Tasks.cc
+++ b/iocore/eventsystem/Tasks.cc
@@ -32,8 +32,6 @@ TasksProcessor tasksProcessor;
int
TasksProcessor::start(int task_threads, size_t stacksize)
{
- if (task_threads > 0) {
- ET_TASK = eventProcessor.spawn_event_threads(task_threads, "ET_TASK",
stacksize);
- }
+ ET_TASK = eventProcessor.spawn_event_threads(task_threads > 0 ? task_threads
: 1, "ET_TASK", stacksize);
return 0;
}
diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc
index d1d9b36..cf36d02 100644
--- a/mgmt/RecordsConfig.cc
+++ b/mgmt/RecordsConfig.cc
@@ -132,7 +132,7 @@ static const RecordElement RecordsConfig[] =
,
{RECT_CONFIG, "proxy.config.accept_threads", RECD_INT, "1", RECU_RESTART_TS,
RR_NULL, RECC_INT, "[0-" TS_STR(TS_MAX_NUMBER_EVENT_THREADS) "]",
RECA_READ_ONLY}
,
- {RECT_CONFIG, "proxy.config.task_threads", RECD_INT, "2", RECU_RESTART_TS,
RR_NULL, RECC_INT, "[0-" TS_STR(TS_MAX_NUMBER_EVENT_THREADS) "]",
RECA_READ_ONLY}
+ {RECT_CONFIG, "proxy.config.task_threads", RECD_INT, "2", RECU_RESTART_TS,
RR_NULL, RECC_INT, "[1-" TS_STR(TS_MAX_NUMBER_EVENT_THREADS) "]",
RECA_READ_ONLY}
,
{RECT_CONFIG, "proxy.config.thread.default.stacksize", RECD_INT, "1048576",
RECU_RESTART_TS, RR_NULL, RECC_INT, "[131072-104857600]", RECA_READ_ONLY}
,
--
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].