Ensure unique timestamp locally for paxos

patch by stefania; reviewed by slebresne for CASSANDRA-9649
This commit is contained in:
Stefania Alborghetti 2015-06-26 10:15:15 +08:00 committed by Sylvain Lebresne
parent 353d4a052c
commit 0bdf92350b
2 changed files with 2 additions and 4 deletions

View File

@ -1,4 +1,5 @@
2.0.17
* Avoid ballot clash in Paxos (CASSANDRA-9649)
* Improve trace messages for RR (CASSANDRA-9479)
* Fix suboptimal secondary index selection when restricted
clustering column is also indexed (CASSANDRA-9631)

View File

@ -346,10 +346,7 @@ public class StorageProxy implements StorageProxyMBean
int contentions = 0;
while (System.nanoTime() - start < timeout)
{
long ballotMillis = summary == null
? System.currentTimeMillis()
: Math.max(System.currentTimeMillis(), 1 + UUIDGen.unixTimestamp(summary.mostRecentInProgressCommit.ballot));
UUID ballot = UUIDGen.getTimeUUID(ballotMillis);
UUID ballot = UUIDGen.getTimeUUID();
// prepare
Tracing.trace("Preparing {}", ballot);