Para agentes de IA: um índice de documentação está disponível em https://www.mongodb.com/pt-br/docs/llms.txt — as versões de markdown de todas as páginas estão disponíveis anexando .md a qualquer caminho de URL.
Menu Docs

abortReshardCollection (comando de banco de dados)

abortReshardCollection

Novidade na versão 5.0.

During a resharding operation, you can abort the operation with the abortReshardCollection command.

You can abort a resharding operation at any point until the commit phase. If the resharding operation has reached the commit phase before you run the abortReshardCollection command, the command returns an error.

Dica

In mongosh, this command can also be run through the sh.abortReshardCollection() helper method.

Helper methods are convenient for mongosh users, but they may not return the same level of information as database commands. In cases where the convenience is not needed or the additional return fields are required, use the database command.

Esse comando está disponível em implantações hospedadas nos seguintes ambientes:

  • MongoDB Atlas: The fully managed service for MongoDB deployments in the cloud

Observação

This command is supported in all MongoDB Atlas clusters. For information on Atlas support for all commands, see Unsupported Commands.

  • MongoDB Enterprise: a versão autogerenciada e baseada em assinatura do MongoDB

  • MongoDB Community: uma versão com código disponível, de uso gratuito e autogerenciada do MongoDB

O comando tem a seguinte sintaxe:

db.adminCommand(
{
abortReshardCollection: "<database>.<collection>"
}
)

O exemplo a seguir aborta uma operação de refragmentação em execução na collection sales.orders :

db.adminCommand({
abortReshardCollection: "sales.orders"
})