Skip to content
Snippets Groups Projects
Commit 35d2c4aa authored by Costin Grigoras's avatar Costin Grigoras
Browse files

Add a random amount of grace time to objects

parent 91ca43cd
No related branches found
No related tags found
No related merge requests found
......@@ -19,6 +19,7 @@ import java.util.Map;
import java.util.UUID;
import java.util.Vector;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ThreadLocalRandom;
import java.util.logging.Level;
import java.util.logging.Logger;
......@@ -1147,7 +1148,7 @@ public class Blob implements Comparable<Blob> {
*/
long getOrSetSupersededTimestamp(final long currentTime) {
if (supersededTimestamp == 0)
supersededTimestamp = currentTime;
supersededTimestamp = currentTime + ThreadLocalRandom.current().nextInt(5000);
return supersededTimestamp;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment