You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "ibessonov (via GitHub)" <gi...@apache.org> on 2023/02/19 12:02:15 UTC
[GitHub] [ignite-3] ibessonov opened a new pull request, #1693: IGNITE-18839 HybridTimestamp and its usages refactored to use 8-bytes representation
ibessonov opened a new pull request, #1693:
URL: https://github.com/apache/ignite-3/pull/1693
https://issues.apache.org/jira/browse/IGNITE-18839
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite-3] ibessonov commented on a diff in pull request #1693: IGNITE-18839 HybridTimestamp and its usages refactored to use 8-bytes representation
Posted by "ibessonov (via GitHub)" <gi...@apache.org>.
ibessonov commented on code in PR #1693:
URL: https://github.com/apache/ignite-3/pull/1693#discussion_r1182250141
##########
modules/core/src/main/java/org/apache/ignite/internal/hlc/HybridClockImpl.java:
##########
@@ -55,47 +57,52 @@ public HybridClockImpl() {
* @param initialTime Initial time.
*/
public HybridClockImpl(HybridTimestamp initialTime) {
Review Comment:
Good question, I have no answer for it. I'll remove this constructor
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite-3] sanpwc commented on a diff in pull request #1693: IGNITE-18839 HybridTimestamp and its usages refactored to use 8-bytes representation
Posted by "sanpwc (via GitHub)" <gi...@apache.org>.
sanpwc commented on code in PR #1693:
URL: https://github.com/apache/ignite-3/pull/1693#discussion_r1180485044
##########
modules/core/src/main/java/org/apache/ignite/internal/hlc/HybridTimestamp.java:
##########
@@ -27,26 +28,34 @@ public final class HybridTimestamp implements Comparable<HybridTimestamp>, Seria
/** Serial version UID. */
private static final long serialVersionUID = 2459861612869605904L;
Review Comment:
Formally, it should be changed.
##########
modules/core/src/main/java/org/apache/ignite/internal/hlc/HybridClockImpl.java:
##########
@@ -55,47 +57,52 @@ public HybridClockImpl() {
* @param initialTime Initial time.
*/
public HybridClockImpl(HybridTimestamp initialTime) {
Review Comment:
Seems that given method is never used. Why do we need it?
##########
modules/raft/src/main/java/org/apache/ignite/raft/jraft/core/Replicator.java:
##########
@@ -743,7 +744,7 @@ private void sendEmptyEntries(final boolean isHeartbeat) {
private void sendEmptyEntries(final boolean isHeartbeat,
final RpcResponseClosure<AppendEntriesResponse> heartBeatClosure) {
final AppendEntriesRequestBuilder rb = raftOptions.getRaftMessagesFactory().appendEntriesRequest();
- rb.timestamp(options.getNode().clockNow());
+ rb.timestampLong(nullableLongTime(options.getNode().clockNow()));
Review Comment:
Not sure that I get an idea of why we use nullable in some places and "non-nullable" in another ones. E.g. why it's possible to have null in this particular place?
##########
modules/core/src/main/java/org/apache/ignite/internal/hlc/HybridClock.java:
##########
@@ -21,6 +21,13 @@
* A Hybrid Logical Clock.
*/
public interface HybridClock {
+ /**
Review Comment:
What about checking logical part overflow? Not sure that it's worth it though.
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite-3] ibessonov commented on a diff in pull request #1693: IGNITE-18839 HybridTimestamp and its usages refactored to use 8-bytes representation
Posted by "ibessonov (via GitHub)" <gi...@apache.org>.
ibessonov commented on code in PR #1693:
URL: https://github.com/apache/ignite-3/pull/1693#discussion_r1182262461
##########
modules/core/src/main/java/org/apache/ignite/internal/hlc/HybridTimestamp.java:
##########
@@ -55,13 +64,54 @@ public final class HybridTimestamp implements Comparable<HybridTimestamp>, Seria
* @param logical The logical time.
*/
public HybridTimestamp(long physical, int logical) {
- assert physical > 0 : physical;
- // Value -1 is used in "org.apache.ignite.internal.hlc.HybridClock.update" to produce "0" after the increment.
- // Real usable value cannot be negative.
- assert logical >= -1 : logical;
+ if (physical < 0 || physical >= (1L << PHYSICAL_TIME_BITS_SIZE)) {
+ throw new IllegalArgumentException("Physical time is out of bounds: " + physical);
+ }
+
+ if (logical < 0 || logical >= (1L << LOGICAL_TIME_BITS_SIZE)) {
+ throw new IllegalArgumentException("Logical time is out of bounds: " + logical);
+ }
+
+ time = (physical << LOGICAL_TIME_BITS_SIZE) | logical;
- this.physical = physical;
- this.logical = logical;
+ if (time <= 0) {
+ throw new IllegalArgumentException("Time is out of bounds: " + time);
+ }
+ }
+
+ private HybridTimestamp(long time) {
+ if (time <= 0) {
+ throw new IllegalArgumentException("Time is out of bounds: " + time);
+ }
+
+ this.time = time;
+ }
+
+ /**
+ * Converts primitive {@code long} representation into a hybrid timestamp instance.
+ * {@link #NULL_HYBRID_TIMESTAMP} is interpreted as {@code null}.
+ *
+ * @throws IllegalArgumentException If timestamp is negative.
+ */
+ public static @Nullable HybridTimestamp ofNullable(long time) {
Review Comment:
Yes, I changed the naming
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite-3] ibessonov commented on a diff in pull request #1693: IGNITE-18839 HybridTimestamp and its usages refactored to use 8-bytes representation
Posted by "ibessonov (via GitHub)" <gi...@apache.org>.
ibessonov commented on code in PR #1693:
URL: https://github.com/apache/ignite-3/pull/1693#discussion_r1182263634
##########
modules/core/src/main/java/org/apache/ignite/internal/hlc/HybridTimestamp.java:
##########
@@ -100,16 +150,14 @@ public long getPhysical() {
* @return The logical component.
*/
public int getLogical() {
- assert logical >= 0;
-
- return logical;
+ return (int) (time << PHYSICAL_TIME_BITS_SIZE >>> PHYSICAL_TIME_BITS_SIZE);
Review Comment:
I don't know what I was thinking) I guess I wanted to reuse constants as much as possible, because technically 0xFF_FF breaks encapsulation
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite-3] SammyVimes commented on a diff in pull request #1693: IGNITE-18839 HybridTimestamp and its usages refactored to use 8-bytes representation
Posted by "SammyVimes (via GitHub)" <gi...@apache.org>.
SammyVimes commented on code in PR #1693:
URL: https://github.com/apache/ignite-3/pull/1693#discussion_r1181537818
##########
modules/core/src/main/java/org/apache/ignite/internal/hlc/HybridTimestamp.java:
##########
@@ -55,13 +64,54 @@ public final class HybridTimestamp implements Comparable<HybridTimestamp>, Seria
* @param logical The logical time.
*/
public HybridTimestamp(long physical, int logical) {
- assert physical > 0 : physical;
- // Value -1 is used in "org.apache.ignite.internal.hlc.HybridClock.update" to produce "0" after the increment.
- // Real usable value cannot be negative.
- assert logical >= -1 : logical;
+ if (physical < 0 || physical >= (1L << PHYSICAL_TIME_BITS_SIZE)) {
+ throw new IllegalArgumentException("Physical time is out of bounds: " + physical);
+ }
+
+ if (logical < 0 || logical >= (1L << LOGICAL_TIME_BITS_SIZE)) {
+ throw new IllegalArgumentException("Logical time is out of bounds: " + logical);
+ }
+
+ time = (physical << LOGICAL_TIME_BITS_SIZE) | logical;
- this.physical = physical;
- this.logical = logical;
+ if (time <= 0) {
Review Comment:
Why can't we use negative value? Because of the comparison?
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/raft/snapshot/outgoing/OutgoingSnapshot.java:
##########
@@ -320,24 +319,28 @@ private SnapshotMvDataResponse.ResponseEntry rowEntry(RowId rowId) {
return null;
}
- List<ByteBuffer> buffers = new ArrayList<>(rowVersionsN2O.size());
- List<HybridTimestamp> commitTimestamps = new ArrayList<>(rowVersionsN2O.size());
+ int count = rowVersionsN2O.size();
+ List<ByteBuffer> buffers = new ArrayList<>(count);
+
+ long[] commitTimestamps = new long[rowVersionsN2O.get(0).isWriteIntent() ? count - 1 : count];
Review Comment:
Let's extract size into another variable
##########
modules/core/src/main/java/org/apache/ignite/internal/hlc/HybridTimestamp.java:
##########
@@ -55,13 +64,54 @@ public final class HybridTimestamp implements Comparable<HybridTimestamp>, Seria
* @param logical The logical time.
*/
public HybridTimestamp(long physical, int logical) {
- assert physical > 0 : physical;
- // Value -1 is used in "org.apache.ignite.internal.hlc.HybridClock.update" to produce "0" after the increment.
- // Real usable value cannot be negative.
- assert logical >= -1 : logical;
+ if (physical < 0 || physical >= (1L << PHYSICAL_TIME_BITS_SIZE)) {
+ throw new IllegalArgumentException("Physical time is out of bounds: " + physical);
+ }
+
+ if (logical < 0 || logical >= (1L << LOGICAL_TIME_BITS_SIZE)) {
+ throw new IllegalArgumentException("Logical time is out of bounds: " + logical);
+ }
+
+ time = (physical << LOGICAL_TIME_BITS_SIZE) | logical;
- this.physical = physical;
- this.logical = logical;
+ if (time <= 0) {
+ throw new IllegalArgumentException("Time is out of bounds: " + time);
+ }
+ }
+
+ private HybridTimestamp(long time) {
+ if (time <= 0) {
+ throw new IllegalArgumentException("Time is out of bounds: " + time);
+ }
+
+ this.time = time;
+ }
+
+ /**
+ * Converts primitive {@code long} representation into a hybrid timestamp instance.
+ * {@link #NULL_HYBRID_TIMESTAMP} is interpreted as {@code null}.
+ *
+ * @throws IllegalArgumentException If timestamp is negative.
+ */
+ public static @Nullable HybridTimestamp ofNullable(long time) {
Review Comment:
Looks a bit weird given that time is a primitive
##########
modules/core/src/main/java/org/apache/ignite/internal/hlc/HybridTimestamp.java:
##########
@@ -100,16 +150,14 @@ public long getPhysical() {
* @return The logical component.
*/
public int getLogical() {
- assert logical >= 0;
-
- return logical;
+ return (int) (time << PHYSICAL_TIME_BITS_SIZE >>> PHYSICAL_TIME_BITS_SIZE);
Review Comment:
Why not just `(int) time & 0xFF_FF`?
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite-3] ibessonov merged pull request #1693: IGNITE-18839 HybridTimestamp and its usages refactored to use 8-bytes representation
Posted by "ibessonov (via GitHub)" <gi...@apache.org>.
ibessonov merged PR #1693:
URL: https://github.com/apache/ignite-3/pull/1693
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite-3] ibessonov commented on a diff in pull request #1693: IGNITE-18839 HybridTimestamp and its usages refactored to use 8-bytes representation
Posted by "ibessonov (via GitHub)" <gi...@apache.org>.
ibessonov commented on code in PR #1693:
URL: https://github.com/apache/ignite-3/pull/1693#discussion_r1182255612
##########
modules/core/src/main/java/org/apache/ignite/internal/hlc/HybridTimestamp.java:
##########
@@ -55,13 +64,54 @@ public final class HybridTimestamp implements Comparable<HybridTimestamp>, Seria
* @param logical The logical time.
*/
public HybridTimestamp(long physical, int logical) {
- assert physical > 0 : physical;
- // Value -1 is used in "org.apache.ignite.internal.hlc.HybridClock.update" to produce "0" after the increment.
- // Real usable value cannot be negative.
- assert logical >= -1 : logical;
+ if (physical < 0 || physical >= (1L << PHYSICAL_TIME_BITS_SIZE)) {
+ throw new IllegalArgumentException("Physical time is out of bounds: " + physical);
+ }
+
+ if (logical < 0 || logical >= (1L << LOGICAL_TIME_BITS_SIZE)) {
+ throw new IllegalArgumentException("Logical time is out of bounds: " + logical);
+ }
+
+ time = (physical << LOGICAL_TIME_BITS_SIZE) | logical;
- this.physical = physical;
- this.logical = logical;
+ if (time <= 0) {
Review Comment:
Yes, negatives are excluded because of comparisons. 0 is excluded, because it's the way to encode `NULL_HYBRID_TIMESTAMP`
##########
modules/core/src/main/java/org/apache/ignite/internal/hlc/HybridTimestamp.java:
##########
@@ -55,13 +64,54 @@ public final class HybridTimestamp implements Comparable<HybridTimestamp>, Seria
* @param logical The logical time.
*/
public HybridTimestamp(long physical, int logical) {
- assert physical > 0 : physical;
- // Value -1 is used in "org.apache.ignite.internal.hlc.HybridClock.update" to produce "0" after the increment.
- // Real usable value cannot be negative.
- assert logical >= -1 : logical;
+ if (physical < 0 || physical >= (1L << PHYSICAL_TIME_BITS_SIZE)) {
+ throw new IllegalArgumentException("Physical time is out of bounds: " + physical);
+ }
+
+ if (logical < 0 || logical >= (1L << LOGICAL_TIME_BITS_SIZE)) {
+ throw new IllegalArgumentException("Logical time is out of bounds: " + logical);
+ }
+
+ time = (physical << LOGICAL_TIME_BITS_SIZE) | logical;
- this.physical = physical;
- this.logical = logical;
+ if (time <= 0) {
Review Comment:
Yes, negatives are excluded because of comparisons. 0 is excluded, because it's the way to encode `NULL_HYBRID_TIMESTAMP`. I'll comment on it
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite-3] ibessonov commented on a diff in pull request #1693: IGNITE-18839 HybridTimestamp and its usages refactored to use 8-bytes representation
Posted by "ibessonov (via GitHub)" <gi...@apache.org>.
ibessonov commented on code in PR #1693:
URL: https://github.com/apache/ignite-3/pull/1693#discussion_r1182253330
##########
modules/core/src/main/java/org/apache/ignite/internal/hlc/HybridClock.java:
##########
@@ -21,6 +21,13 @@
* A Hybrid Logical Clock.
*/
public interface HybridClock {
+ /**
Review Comment:
Overflow will add a new millisecond to physical time, so it's safe to use without checks
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite-3] ibessonov commented on a diff in pull request #1693: IGNITE-18839 HybridTimestamp and its usages refactored to use 8-bytes representation
Posted by "ibessonov (via GitHub)" <gi...@apache.org>.
ibessonov commented on code in PR #1693:
URL: https://github.com/apache/ignite-3/pull/1693#discussion_r1182280885
##########
modules/core/src/main/java/org/apache/ignite/internal/hlc/HybridTimestamp.java:
##########
@@ -100,16 +150,14 @@ public long getPhysical() {
* @return The logical component.
*/
public int getLogical() {
- assert logical >= 0;
-
- return logical;
+ return (int) (time << PHYSICAL_TIME_BITS_SIZE >>> PHYSICAL_TIME_BITS_SIZE);
Review Comment:
I fixed the code with the introduction of proper constant
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite-3] sashapolo commented on a diff in pull request #1693: IGNITE-18839 HybridTimestamp and its usages refactored to use 8-bytes representation
Posted by "sashapolo (via GitHub)" <gi...@apache.org>.
sashapolo commented on code in PR #1693:
URL: https://github.com/apache/ignite-3/pull/1693#discussion_r1178796930
##########
modules/core/src/test/java/org/apache/ignite/internal/util/PendingComparableValuesTrackerTest.java:
##########
@@ -97,8 +97,7 @@ public void testMultithreadedWaitFor() throws Exception {
tracker.update(now);
- HybridTimestamp timestampToWait =
- new HybridTimestamp(now.getPhysical() + 1, now.getLogical() + random.nextInt(1000));
+ HybridTimestamp timestampToWait = now.addTicks((1 << HybridTimestamp.LOGICAL_TIME_BITS_SIZE) + random.nextInt(1000));
Review Comment:
What is this change for? The previous version was much more readable
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/raft/snapshot/incoming/IncomingSnapshotCopier.java:
##########
@@ -393,7 +393,7 @@ private String createPartitionInfo() {
private void writeVersion(ResponseEntry entry, int i) {
RowId rowId = new RowId(partId(), entry.rowId());
- HybridTimestamp timestamp = i < entry.timestamps().size() ? entry.timestamps().get(i) : null;
+ Long timestamp = i < entry.timestamps().length ? entry.timestamps()[i] : null;
Review Comment:
Can we move `i < entry.timestamps().length` check to the `if` below? What's the point of creating a `Long` here?
##########
modules/transactions/src/main/java/org/apache/ignite/internal/tx/TransactionIds.java:
##########
@@ -32,7 +34,7 @@ public class TransactionIds {
* @return Transaction ID corresponding to the provided values.
*/
public static UUID transactionId(HybridTimestamp beginTimestamp, int nodeId) {
- return new UUID(beginTimestamp.getPhysical(), (((long) beginTimestamp.getLogical()) << Integer.SIZE) | (nodeId & 0xFFFFFFFFL));
+ return new UUID(beginTimestamp.longValue(), (nodeId & 0xFFFFFFFFL));
Review Comment:
Let's use `Integer.toUnsignedLong` here
##########
modules/transactions/src/main/java/org/apache/ignite/internal/tx/TransactionIds.java:
##########
@@ -42,6 +44,6 @@ public static UUID transactionId(HybridTimestamp beginTimestamp, int nodeId) {
* @return Begin timestamp of the transaction.
*/
public static HybridTimestamp beginTimestamp(UUID transactionId) {
- return new HybridTimestamp(transactionId.getMostSignificantBits(), (int) (transactionId.getLeastSignificantBits() >> Integer.SIZE));
+ return requireNonNull(HybridTimestamp.of(transactionId.getMostSignificantBits()));
Review Comment:
Can `HybridTimestamp.of` return null?
##########
modules/core/src/main/java/org/apache/ignite/internal/hlc/HybridTimestamp.java:
##########
@@ -55,13 +66,35 @@ public final class HybridTimestamp implements Comparable<HybridTimestamp>, Seria
* @param logical The logical time.
*/
public HybridTimestamp(long physical, int logical) {
- assert physical > 0 : physical;
- // Value -1 is used in "org.apache.ignite.internal.hlc.HybridClock.update" to produce "0" after the increment.
- // Real usable value cannot be negative.
- assert logical >= -1 : logical;
+ if (physical < 0 || physical >= (1L << PHYSICAL_TIME_BITS_SIZE)) {
+ throw new IllegalArgumentException("physical time is out of bounds: " + physical);
+ }
- this.physical = physical;
- this.logical = logical;
+ if (logical < 0 || logical >= (1L << LOGICAL_TIME_BITS_SIZE)) {
+ throw new IllegalArgumentException("logical time is out of bounds: " + logical);
+ }
+
+ time = (physical << LOGICAL_TIME_BITS_SIZE) | logical;
+
+ if (time <= 0) {
+ throw new IllegalArgumentException("time is out of bounds: " + time);
+ }
+ }
+
+ private HybridTimestamp(long time) {
+ if (time <= 0) {
+ throw new IllegalArgumentException("time is out of bounds: " + time);
+ }
+
+ this.time = time;
+ }
+
+ public static @Nullable HybridTimestamp of(long time) {
Review Comment:
Looks like we need to add a bunch of `@Nullable` annotations to methods that use this method's result as their result
##########
modules/core/src/main/java/org/apache/ignite/internal/hlc/HybridTimestamp.java:
##########
@@ -190,6 +220,6 @@ public String toString() {
* Returns a new hybrid timestamp with incremented physical component.
*/
public HybridTimestamp addPhysicalTime(long mills) {
- return new HybridTimestamp(physical + mills, logical);
+ return new HybridTimestamp(addExact(getPhysical(), mills), getLogical());
Review Comment:
Wouldn't it be more effective to shift `mills` and add it to the whole long value?
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite-3] ibessonov commented on a diff in pull request #1693: IGNITE-18839 HybridTimestamp and its usages refactored to use 8-bytes representation
Posted by "ibessonov (via GitHub)" <gi...@apache.org>.
ibessonov commented on code in PR #1693:
URL: https://github.com/apache/ignite-3/pull/1693#discussion_r1182281099
##########
modules/core/src/main/java/org/apache/ignite/internal/hlc/HybridTimestamp.java:
##########
@@ -27,26 +28,34 @@ public final class HybridTimestamp implements Comparable<HybridTimestamp>, Seria
/** Serial version UID. */
private static final long serialVersionUID = 2459861612869605904L;
Review Comment:
Done
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite-3] ibessonov commented on a diff in pull request #1693: IGNITE-18839 HybridTimestamp and its usages refactored to use 8-bytes representation
Posted by "ibessonov (via GitHub)" <gi...@apache.org>.
ibessonov commented on code in PR #1693:
URL: https://github.com/apache/ignite-3/pull/1693#discussion_r1182252240
##########
modules/raft/src/main/java/org/apache/ignite/raft/jraft/core/Replicator.java:
##########
@@ -743,7 +744,7 @@ private void sendEmptyEntries(final boolean isHeartbeat) {
private void sendEmptyEntries(final boolean isHeartbeat,
final RpcResponseClosure<AppendEntriesResponse> heartBeatClosure) {
final AppendEntriesRequestBuilder rb = raftOptions.getRaftMessagesFactory().appendEntriesRequest();
- rb.timestamp(options.getNode().clockNow());
+ rb.timestampLong(nullableLongTime(options.getNode().clockNow()));
Review Comment:
I think that this simply is a bad name for the method, because it implies nullable parameter, not nullable result. I'll rename it.
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org