Yes, this code will turn into HashPartitioning. RoundRobin is going to be used only in case when you provide numer of partitions to reparition function but without any repartition expression.
In your case i think that you should be fine. Lets take a look what Spark is producing in its plan, for us most important part is here:
(2) Project [codegen id : 1] Output 1:
[monotonically_increasing_id() AS _nondeterministic#64L] Input: []
(3) Exchange Input 1: [_nondeterministic#64L] Arguments:
hashpartitioning((cast(_nondeterministic#64L as double) / 10000.0),
42), REPARTITION_BY_NUM, [id=#231]
So we have two stages, first with project which will get value from monotonically_increasing_id and then we have the hashparitioning
Lets say that our input has 10 partition, we do the project and then exchange succesffuly for 9 partitions but 1 failed and needs to be recomputed. At this stage data from partitions 1-9 are calculated but for partition 10 spark need to call monotonically_increasing_id() again.
Spark 3.0 source code for this function
It looks like this function is non-deterministic because its result depends on partition number. So the question is if during recomputation partition number if changing and for this moment i dont have answer. But if it is not changing (thats my expectation) you are going to get the same values, if its changing, you are going to get different values here and your data may be distributed a little bit different but it still should be ok in your case (data distribution should be very similar).