In a replica set running with the storage engine MMAPv1, a collection rename with the dropTarget option set to true may fail when the destination namespace refers to a collection with long index names approaching the MMAP namespace limit of 127 characters.
The renameCollection operation would return an error with the code 10080 and a message containing the target namespace (the collection being replaced):
{ "errmsg" : "ns name test.system.drop.1536175136i10t1.t.$aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa (size: 155) too long, max size is 127 bytes", "code" : 10080, .... }