Issue:
In FileCopyBasedInitialSyncer::_cloneFiles, we can have a deadlock while acquiring FileCopyBasedInitialSyncer::_mutex between the main asyncTry and the return future.
I assume that can happen if the startClonerFuture is ready before we hit the return statement.
Proposed fix:
The lock in the main asyncTry needs to be scoped to include only state's changing lines and not to include the return statement.
Needed for better debugging:
Can we add also a log line in the begging of FileCopyBasedInitialSyncer::_cloneFiles to output the number of files in filesToClone