[SERVER-43618] taskExecutorPoolSize should be a startup only server parameter Created: 25/Sep/19  Updated: 19/Oct/23

Status: Backlog
Project: Core Server
Component/s: Internal Code
Affects Version/s: 4.0 Required
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: peng zhenyi Assignee: Backlog - Service Architecture
Resolution: Unresolved Votes: 0
Labels: sa-remove-fv-backlog-22
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Service Arch
Operating System: ALL
Steps To Reproduce:

1. Run the following command, returns OK, but pool size is not changed actually

mongos> db.runCommand({setParameter:1, taskExecutorPoolSize: 8})
{
	"was" : 1,
	"ok" : 1,
	"operationTime" : Timestamp(1569392777, 1),
	"$clusterTime" : {
		"clusterTime" : Timestamp(1569392777, 1),
		"signature" : {
			"hash" : BinData(0,"SSopIIShlpP6yJNJCZ5C50OrzAo="),
			"keyId" : NumberLong("6737601513192947742")
		}
	}
}

2. Declare taskExecutorPoolSize to be a MONGO_EXPORT_STARTUP_SERVER_PARAMETER, then error is returned as expected.

mongos> db.runCommand({setParameter:1, taskExecutorPoolSize:8})
{
	"ok" : 0,
	"errmsg" : "not allowed to change [taskExecutorPoolSize] at runtime",
	"operationTime" : Timestamp(1569402193, 1),
	"$clusterTime" : {
		"clusterTime" : Timestamp(1569402193, 1),
		"signature" : {
			"hash" : BinData(0,"t95Ob+EY18fuN43MW4dt6cpBZOE="),
			"keyId" : NumberLong("6737601513192947742")
		}
	}
}

Participants:
Case:

 Description   

TaskExecutorPoolSize should not be modified in runtime, according to document: https://docs.mongodb.com/v4.0/reference/parameters/#param.taskExecutorPoolSize

But it is declared to be a MONGO_EXPORT_SERVER_PARAMETER which can be set at startup or at runtime.

So when I run the setParameter command, it returns OK. but pool size is not changed actually.
This may be misleading to developers.
I think this parameter should be declared as a MONGO_EXPORT_STARTUP_SERVER_PARAMETER which can only be set at startup



 Comments   
Comment by peng zhenyi [ 15/Sep/21 ]

I can reproduce this issue in version 5.1.0 :

mongos> db.runCommand({setParameter:1,taskExecutorPoolSize:8})
{
	"was" : 1,
	"ok" : 1,
	"$clusterTime" : {
		"clusterTime" : Timestamp(1631672362, 1),
		"signature" : {
			"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
			"keyId" : NumberLong(0)
		}
	},
	"operationTime" : Timestamp(1631672362, 1)
}
mongos> db.runCommand({getParameter:1,taskExecutorPoolSize:1})
{
	"taskExecutorPoolSize" : 8,
	"ok" : 1,
	"$clusterTime" : {
		"clusterTime" : Timestamp(1631672363, 1),
		"signature" : {
			"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
			"keyId" : NumberLong(0)
		}
	},
	"operationTime" : Timestamp(1631672363, 1)
}

SetParameter and getParameter are ok. But actually taskExecutorPoolSize is not changed

Comment by peng zhenyi [ 15/Sep/21 ]

Branch master: https://github.com/mongodb/mongo/pull/1416

Comment by peng zhenyi [ 25/Sep/19 ]

Branch v4.0: https://github.com/mongodb/mongo/pull/1325

Generated at Thu Feb 08 05:03:38 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.