SERVER-44186, we added support for allow two phase index builds to continue running on stepdown. The responsibility for completing the index build, which can be observed in the oplog by the presence of the commitIndexBuild oplog entry, will fall on the new primary.
However, since unique index builds have constraints that are set up at the beginning of the build, it was necessary, in
SERVER-44397, to temporarily disable failover support, which means unique index builds are aborted on stepdown currently.
In this ticket, we will look into re-enabling failover support for unique indexes.