Merge "reftable: add random suffix to table names"
This commit is contained in:
commit
c2990810e9
|
@ -21,6 +21,7 @@
|
|||
import java.io.InputStreamReader;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
import java.security.SecureRandom;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
@ -65,6 +66,8 @@ private static class StackEntry {
|
|||
|
||||
private final Runnable onChange;
|
||||
|
||||
private final SecureRandom random = new SecureRandom();
|
||||
|
||||
private final Supplier<Config> configSupplier;
|
||||
|
||||
// Used for stats & testing.
|
||||
|
@ -365,8 +368,9 @@ private long nextUpdateIndex() throws IOException {
|
|||
}
|
||||
|
||||
private String filename(long low, long high) {
|
||||
return String.format("%012x-%012x", //$NON-NLS-1$
|
||||
Long.valueOf(low), Long.valueOf(high));
|
||||
return String.format("%012x-%012x-%08x", //$NON-NLS-1$
|
||||
Long.valueOf(low), Long.valueOf(high),
|
||||
random.nextInt());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue