Details
-
Task
-
Resolution: Duplicate
-
Major
-
None
-
7.6.2
-
None
Description
In this improvement, we added the ability to assign number of threads to each backup service node. When a backup or a restore is run, the backup service will check the number of threads configured for each node and once decided on which node the job will run, the assigned number of threads is used.
To use this feature, you can utilise three API endpoints explained below:
1. GET /api/v1/nodesThreadsMap
This GET will return a map of nodes and number of threads if already set.
curl -X GET http://localhost:7101/api/v1/nodesThreadsMap -u Administrator:'asdasd'
|
2. POST /api/v1/nodesThreadsMap
This POST will accept a map of nodes and their associated threads and will OVERWRITE the map stored in the backup service.
curl -X POST http://localhost:7102/api/v1/nodesThreadsMap -u Administrator:'asdasd' -d '{"nodes_threads_map":{"2d403e0e36507f48456c2dfeedec83fe":4, "1a6d1393de178c43ee565644923c9ca0":3}}'
|
3. PATCH /api/v1/nodesThreadsMap
This PATCH will accept a map of nodes and their associated threads but will only update the value or add it if non-existent. It will not overwrite the pre-existing map.
curl -X PATCH http://localhost:7102/api/v1/nodesThreadsMap -u Administrator:'asdasd' -d '{"nodes_threads_map":{"2d403e0e36507f48456c2dfeedec83fe":6}}'
|
PATCH can accept a map of only one node if the user needs to update only one node's threads and keep the rest the same.
This map is saved in metaKV with the path: cbbs/config/nodesThreadsMap in the following form:
{
|
"nodes_threads_map": |
{
|
"2d403e0e36507f48456c2dfeedec83fe":6, |
"1a6d1393de178c43ee565644923c9ca0":3 |
}
|
}
|
If the user wants to allow cbbackupmgr to select the number of threads automatically, the can assign the node 0 threads which will correspond to --auto-select-threads when the backup/restore job is run like so:
curl -X PATCH http://localhost:7102/api/v1/nodesThreadsMap -u Administrator:'asdasd' -d '{"nodes_threads_map":{"2d403e0e36507f48456c2dfeedec83fe":0}}'
|
and the result would be:
{
|
"nodes_threads_map": |
{
|
"2d403e0e36507f48456c2dfeedec83fe":0, |
"1a6d1393de178c43ee565644923c9ca0":3 |
}
|
}
|
Attachments
Issue Links
- relates to
-
MB-54433 Backup Service: Allow changing number of threads for cbbackupmgr in cbbs
-
- Closed
-