OPTIONS

sh._lastMigration()

On this page

Definition

sh._lastMigration(namespace)

Returns information on the last migration performed on the specified database or collection.

The sh._lastMigration() method has the following parameter:

Parameter Type Description
namespace string The namespace of a database or collection within the current database.

Output

The sh._lastMigration() method returns a document with details about the last migration performed on the database or collection. The document contains the following output:

sh._lastMigration._id

The id of the migration task.

sh._lastMigration.server

The name of the server.

sh._lastMigration.clientAddr

The IP address and port number of the server.

sh._lastMigration.time

The time of the last migration, formatted as ISODate.

sh._lastMigration.what

The specific type of migration.

sh._lastMigration.ns

The complete namespace of the collection affected by the migration.

sh._lastMigration.details

A document containing details about the migrated chunk. The document includes min and max embedded documents with the bounds of the migrated chunk.

Was this page helpful?

Yes No

Thank you for your feedback!

We're sorry! You can Report a Problem to help us improve this page.