[SERVER-72362] Fix loops conditions in `IdempotentRenameRangeDeletionsTest` Created: 22/Dec/22  Updated: 29/Oct/23  Resolved: 22/Dec/22

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 6.3.0-rc0

Type: Bug Priority: Major - P3
Reporter: Pierlauro Sciarelli Assignee: Pierlauro Sciarelli
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding EMEA 2022-12-26
Participants:
Linked BF Score: 135

 Description   

The loops in this disabled test are executed a random number of times that may be zero.

Purpose of this ticket is to re-enable the test and make sure that the loops get all executed at least once.

This test is around from ages, so someone may wonder: why did it start failing only some time ago? It turns out that SERVER-72031 added an additional call to rand() happening before the failing unit test, shifting by one the quite deterministic sequence of generated values.

So the conclusion is: rand() is not that that random after all. Let's always use PseudoRandom that is really generating random values via XorShift128.



 Comments   
Comment by Githook User [ 22/Dec/22 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-72362 Fix loops conditions in `IdempotentRenameRangeDeletionsTest`
Branch: master
https://github.com/mongodb/mongo/commit/b7689c3ec4d33eb3e9762c26e930a214dd803e43

Generated at Thu Feb 08 06:21:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.