You need to enable JavaScript to run this app.
Torch Log Service

Torch Log Service

Copy page
Download PDF
Shard management API
ManualMergeShard
Copy page
Download PDF
ManualMergeShard
Call the ManualMergeShard API to manually merge shards.​
Instructions​
This API is used to manually merge specified shards. The call frequency is limited to 20 times per second. For a single log topic, the concurrency limit for manual merges is 1. If the limit is exceeded, an ExceedQPSLimit error will be returned.​
Shard merging means combining two adjacent read-write shards into a new read-write shard. The MD5 range of the merged shard will include both original MD5 ranges, and the original read-write shards will become read-only.​
tip​
  • The system automatically merges the adjacent shard on the right.​
  • Merging the last read-write shard is not supported.​
  • Merging read-only shards is not supported.​
Request description​
  • Request method: POST​
  • Request URL: https://{tls-endpoint}/ManualMergeShard​
Request parameters​
The following table lists only the unique request parameters for this API and some common parameters. For more information, see Common parameters.​
Body​
​
Parameters​
Type​
Required​
Example value​
Description​
ShardId​
Integer​
Yes​
0​
The ID of the log shard to be merged.​
TopicId​
String​
Yes​
c7e0e442-19bf-4fb3-b547-5992fb8b****​
Log topic ID.​
​
Response parameters​
The following table lists only the unique response parameters for this API. For more information, see Response structure.​
​
Parameters​
Type​
Example value​
Description​
Shards​
Array of QueryResp​
/​
Detailed information such as the range of the merged log shard.​
​
QueryResp​
​
Parameters​
Type​
Example value​
Description​
Status​
String​
readwrite​
Shard status.​
  • readwrite: Read/write.​
  • readonly: Read-only.​
ShardId​
Integer​
2​
The shard ID of the log topic.​
TopicId​
String​
4a9bd4bd-53f1-43ff-b88a-64ee1be5****​
The ID of the log topic.​
ModifyTime​
String​
2021-05-24 16:19:46​
Shard modification time.​
StopWriteTime​
String​
2021-05-24 16:19:46​
The time when the shard stopped writing, that is, the last time this shard wrote a log.​
ExclusiveEndKey​
String​
7fffffffffffffffffffffffffffffff​
The key value at the end of the shard.​
InclusiveBeginKey​
String​
00000000000000000000000000000000​
The key value at the start of the shard.​
​
Request example​
​
POST https://{tls-endpoint}/ManualMergeShard HTTP/1.1​
Content-Type: application/json​
{​
"ShardId": 0,​
"TopicId": "c7e0e442-19bf-4fb3-b547-5992fb8b****"​
}​
​
Response example​
​
Content-Type: application/json; charset=utf-8​
{​
"Shards": [​
{​
"Status": "readwrite",​
"ShardId": 2,​
"TopicId": "4a9bd4bd-53f1-43ff-b88a-64ee1be5****",​
"ModifyTime": "2021-05-24 16:19:46",​
"StopWriteTime": "2021-05-24 16:19:46",​
"ExclusiveEndKey": "7fffffffffffffffffffffffffffffff",​
"InclusiveBeginKey": "00000000000000000000000000000000"​
}​
]​
}​
​
Error Code​
You can visit Common error codes for more error code information.​
Last updated: 2026.05.28 17:35:53