ascherbakoff commented on code in PR #7244:
URL: https://github.com/apache/ignite-3/pull/7244#discussion_r2630919645
##########
modules/core/src/main/java/org/apache/ignite/internal/util/SafeTimeValuesTracker.java:
##########
@@ -30,24 +33,44 @@ public SafeTimeValuesTracker(HybridTimestamp initialValue) {
super(initialValue);
}
- @Override
- public void update(HybridTimestamp newValue, @Nullable Void futureResult) {
+ // Holds successful application context.
+ private long commandIndex;
+ private long commandTerm;
+ private String cmdCls;
+
+ /**
+ * Update safe timestamp.
+ *
+ * @param safeTs The value.
+ * @param commandIndex Command index.
+ * @param commandTerm Command term.
+ * @param cmdCls Command class name.
+ */
+ public void update(HybridTimestamp safeTs, long commandIndex, long
commandTerm, String cmdCls) {
if (!enterBusy()) {
throw new TrackerClosedException();
}
try {
Map.Entry<HybridTimestamp, @Nullable Void> current = this.current;
- IgniteBiTuple<HybridTimestamp, @Nullable Void> newEntry = new
IgniteBiTuple<>(newValue, futureResult);
+ IgniteBiTuple<HybridTimestamp, @Nullable Void> newEntry = new
IgniteBiTuple<>(safeTs, null);
// Entries from the same batch receive equal safe timestamps.
if (comparator.compare(newEntry, current) < 0) {
- throw new AssertionError("Reordering detected: [old=" +
current.getKey() + ", new=" + newEntry.get1() + ']');
+ throw new IgniteInternalException(INTERNAL_ERR,
+ "Reordering detected: [old=" + current.getKey() + ",
new=" + newEntry.get1()
+ + ", index=" + this.commandIndex
+ + ", term=" + this.commandTerm
Review Comment:
Added old and new indexes + command dump
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]