Committed by
Gerrit Code Review
Fix entries getting stuck in the pending map.
Pending map timestamp should be composite of (IntentData.version(), wallclocktime) Change-Id: I3caf739c4fdb70535696176621649f0842eea467
Showing
1 changed file
with
2 additions
and
1 deletions
... | @@ -18,6 +18,7 @@ package org.onosproject.store.intent.impl; | ... | @@ -18,6 +18,7 @@ package org.onosproject.store.intent.impl; |
18 | import org.onosproject.net.intent.IntentData; | 18 | import org.onosproject.net.intent.IntentData; |
19 | import org.onosproject.store.Timestamp; | 19 | import org.onosproject.store.Timestamp; |
20 | import org.onosproject.store.impl.ClockService; | 20 | import org.onosproject.store.impl.ClockService; |
21 | +import org.onosproject.store.impl.MultiValuedTimestamp; | ||
21 | 22 | ||
22 | /** | 23 | /** |
23 | * ClockService that uses IntentData versions as timestamps. | 24 | * ClockService that uses IntentData versions as timestamps. |
... | @@ -25,6 +26,6 @@ import org.onosproject.store.impl.ClockService; | ... | @@ -25,6 +26,6 @@ import org.onosproject.store.impl.ClockService; |
25 | public class IntentDataClockManager<K> implements ClockService<K, IntentData> { | 26 | public class IntentDataClockManager<K> implements ClockService<K, IntentData> { |
26 | @Override | 27 | @Override |
27 | public Timestamp getTimestamp(K key, IntentData intentData) { | 28 | public Timestamp getTimestamp(K key, IntentData intentData) { |
28 | - return intentData.version(); | 29 | + return new MultiValuedTimestamp<>(intentData.version(), System.nanoTime()); |
29 | } | 30 | } |
30 | } | 31 | } | ... | ... |
-
Please register or login to post a comment