Database Manual / Reference / Database Commands / Replication

applyOps (database command数据库命令)

Definition定义

applyOps
Applies specified oplog entries to a mongod instance. The applyOps command is an internal command.将指定的oplog条目应用于mongod实例。applyOps命令是一个内部命令。

Compatibility兼容性

This command is available in deployments hosted in the following environments:此命令在以下环境中托管的部署中可用:

  • MongoDB Enterprise: The subscription-based, self-managed version of MongoDB:MongoDB的基于订阅的自我管理版本
  • MongoDB Community: The source-available, free-to-use, and self-managed version of MongoDB:MongoDB的源代码可用、免费使用和自我管理版本

Behavior行为

Warning

This command obtains a global write lock and will block other operations until it has completed.此命令获得全局写锁,并将阻止其他操作,直到完成为止。

Required Access所需访问权限

If the specified oplog entries contain collection UUIDs, executing this command requires both the useUUID and forceUUID privileges on the cluster resource to which the oplog entries are attempting to be written.如果指定的oplog条目包含集合UUID,则执行此命令需要对oplog条目试图写入的集群资源同时具有useUUIDforceUUID权限。