reshardCollection Event
On this page本页内容
Summary摘要
Description描述
_id | Document | resumeToken for the resumeAfter parameter when resuming a change stream. resumeAfter参数的resumeToken。_id object has the following form: _id对象具有以下形式:{
_data type depends on the MongoDB versions and, in some cases, the feature compatibility version (fCV) at the time of the change stream's opening or resumption. _data类型取决于MongoDB版本,在某些情况下,还取决于更改流打开或恢复时的功能兼容性版本(fCV)。_data types._data类型的完整列表。resumeToken, see Resume a Change Stream. resumeToken恢复更改流的示例,请参阅恢复更改流。 |
clusterTime | Timestamp | clusterTime value: the time when the transaction was committed.clusterTime值:事务提交的时间。clusterTime may not all relate to the same transaction. Some events don't relate to a transaction at all.clusterTime的事件可能并不都与同一事务相关。有些事件根本与事务无关。lsid and txnNumber in the change stream event document. lsid和txnNumber的组合。 |
collectionUUID | UUID | UUID |
ns | Document | |
ns.coll | String | |
ns.db | String | |
operationDescription | Document | |
operationDescription.reshardUUID | UUID | |
operationDescription. | shardKey | Document | |
operationDescription. | oldShardKey | Document | |
operationDescription. | unique | Boolean | true。 |
operationDescription. | numInitialChunks | NumberLong | shardCollection operation. shardCollection操作期间在每个分片上创建的块数。 |
operationDescription.collation | Document | |
operationDescription.zones | Array |
Example实例
The following example shows a 以下示例显示了一个reshardCollection event:reshardCollection事件:
{
"_id": { <ResumeToken> },
"operationType": "reshardCollection",
"collectionUUID": 0,
"ns": {"db": "reshard_collection_event", "coll": "coll"},
"operationDescription": {
"reshardUUID": 0,
"shardKey": {"newKey": 1},
"oldShardKey": {"_id": 1},
"unique": false,
"numInitialChunks": NumberLong(1),
"collation": {"locale": "simple"},
"zones": [
{"zone": "zone1", "min": {"newKey": {"$minKey": 1}}, "max": {"newKey": {"$maxKey": 1}}}
]
}
}