You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2022/12/06 12:56:36 UTC
[GitHub] [ignite-3] ibessonov opened a new pull request, #1411: IGNITE-17871 JDKMarshaller replaced with OptimizedMarshaller for RAFT commands.
ibessonov opened a new pull request, #1411:
URL: https://github.com/apache/ignite-3/pull/1411
https://issues.apache.org/jira/browse/IGNITE-17871
--
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] sk0x50 commented on a diff in pull request #1411: IGNITE-17871 JDKMarshaller replaced with OptimizedMarshaller for RAFT commands.
Posted by GitBox <gi...@apache.org>.
sk0x50 commented on code in PR #1411:
URL: https://github.com/apache/ignite-3/pull/1411#discussion_r1043112966
##########
modules/raft/src/testFixtures/java/org/apache/ignite/raft/server/counter/GetValueCommand.java:
##########
@@ -18,9 +18,17 @@
package org.apache.ignite.raft.server.counter;
import org.apache.ignite.internal.raft.ReadCommand;
+import org.apache.ignite.network.annotations.Transferable;
+import org.apache.ignite.raft.messages.TestMessageGroup;
+import org.apache.ignite.raft.messages.TestRaftMessagesFactory;
/**
* Get a value command.
*/
-public class GetValueCommand implements ReadCommand {
+//TODO Move to integration test directory when Maven build is not supported anymore.
Review Comment:
Please add a link to the corresponding ticket.
--
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 #1411: IGNITE-17871 JDKMarshaller replaced with OptimizedMarshaller for RAFT commands.
Posted by GitBox <gi...@apache.org>.
ibessonov commented on code in PR #1411:
URL: https://github.com/apache/ignite-3/pull/1411#discussion_r1044189811
##########
modules/raft/src/testFixtures/java/org/apache/ignite/raft/server/counter/IncrementAndGetCommand.java:
##########
@@ -18,29 +18,22 @@
package org.apache.ignite.raft.server.counter;
import org.apache.ignite.internal.raft.WriteCommand;
+import org.apache.ignite.network.annotations.Transferable;
+import org.apache.ignite.raft.messages.TestMessageGroup;
+import org.apache.ignite.raft.messages.TestRaftMessagesFactory;
/**
* Increment and get command.
*/
-public class IncrementAndGetCommand implements WriteCommand {
- /**
- * The delta.
- */
- private final long delta;
-
- /**
- * Constructor.
- *
- * @param delta The delta.
- */
- public IncrementAndGetCommand(long delta) {
- this.delta = delta;
- }
-
+//TODO Move to integration test directory when Maven build is not supported anymore.
+@Transferable(TestMessageGroup.INCREMENT_AND_GET_COMMAND)
+public interface IncrementAndGetCommand extends WriteCommand {
/**
* Returns the delta.
*/
- public long delta() {
- return delta;
+ long delta();
+
+ static IncrementAndGetCommand incrementAndGetCommand(long delta) {
Review Comment:
Just to be clear, these are test messages. I don't do things like that in production messages.
--
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] sk0x50 commented on a diff in pull request #1411: IGNITE-17871 JDKMarshaller replaced with OptimizedMarshaller for RAFT commands.
Posted by GitBox <gi...@apache.org>.
sk0x50 commented on code in PR #1411:
URL: https://github.com/apache/ignite-3/pull/1411#discussion_r1043112966
##########
modules/raft/src/testFixtures/java/org/apache/ignite/raft/server/counter/GetValueCommand.java:
##########
@@ -18,9 +18,17 @@
package org.apache.ignite.raft.server.counter;
import org.apache.ignite.internal.raft.ReadCommand;
+import org.apache.ignite.network.annotations.Transferable;
+import org.apache.ignite.raft.messages.TestMessageGroup;
+import org.apache.ignite.raft.messages.TestRaftMessagesFactory;
/**
* Get a value command.
*/
-public class GetValueCommand implements ReadCommand {
+//TODO Move to integration test directory when Maven build is not supported anymore.
Review Comment:
Please add a link to the corresponding ticket (here and below)
--
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 #1411: IGNITE-17871 JDKMarshaller replaced with OptimizedMarshaller for RAFT commands.
Posted by GitBox <gi...@apache.org>.
ibessonov commented on code in PR #1411:
URL: https://github.com/apache/ignite-3/pull/1411#discussion_r1041879334
##########
modules/raft/src/integrationTest/java/org/apache/ignite/raft/server/counter/GetValueCommand.java:
##########
@@ -18,9 +18,14 @@
package org.apache.ignite.raft.server.counter;
import org.apache.ignite.internal.raft.ReadCommand;
+import org.apache.ignite.network.annotations.Transferable;
/**
* Get a value command.
*/
-public class GetValueCommand implements ReadCommand {
+@Transferable(1_000)
Review Comment:
No, we don't, I'll do it if you're asking
##########
modules/raft/src/main/java/org/apache/ignite/internal/raft/server/impl/JraftServerImpl.java:
##########
@@ -113,6 +114,9 @@ public class JraftServerImpl implements RaftServer {
/** Request executor. */
private ExecutorService requestExecutor;
+ /** Marshaller. */
Review Comment:
I'll fix 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 #1411: IGNITE-17871 JDKMarshaller replaced with OptimizedMarshaller for RAFT commands.
Posted by GitBox <gi...@apache.org>.
ibessonov commented on code in PR #1411:
URL: https://github.com/apache/ignite-3/pull/1411#discussion_r1043288980
##########
modules/raft/src/testFixtures/java/org/apache/ignite/raft/server/counter/IncrementAndGetCommand.java:
##########
@@ -18,29 +18,22 @@
package org.apache.ignite.raft.server.counter;
import org.apache.ignite.internal.raft.WriteCommand;
+import org.apache.ignite.network.annotations.Transferable;
+import org.apache.ignite.raft.messages.TestMessageGroup;
+import org.apache.ignite.raft.messages.TestRaftMessagesFactory;
/**
* Increment and get command.
*/
-public class IncrementAndGetCommand implements WriteCommand {
- /**
- * The delta.
- */
- private final long delta;
-
- /**
- * Constructor.
- *
- * @param delta The delta.
- */
- public IncrementAndGetCommand(long delta) {
- this.delta = delta;
- }
-
+//TODO Move to integration test directory when Maven build is not supported anymore.
+@Transferable(TestMessageGroup.INCREMENT_AND_GET_COMMAND)
+public interface IncrementAndGetCommand extends WriteCommand {
/**
* Returns the delta.
*/
- public long delta() {
- return delta;
+ long delta();
+
+ static IncrementAndGetCommand incrementAndGetCommand(long delta) {
Review Comment:
For convenience. It's much easier this way, otherwise we'll have a lot of boilerplate in tests
##########
modules/raft/src/testFixtures/java/org/apache/ignite/raft/server/counter/IncrementAndGetCommand.java:
##########
@@ -18,29 +18,22 @@
package org.apache.ignite.raft.server.counter;
import org.apache.ignite.internal.raft.WriteCommand;
+import org.apache.ignite.network.annotations.Transferable;
+import org.apache.ignite.raft.messages.TestMessageGroup;
+import org.apache.ignite.raft.messages.TestRaftMessagesFactory;
/**
* Increment and get command.
*/
-public class IncrementAndGetCommand implements WriteCommand {
- /**
- * The delta.
- */
- private final long delta;
-
- /**
- * Constructor.
- *
- * @param delta The delta.
- */
- public IncrementAndGetCommand(long delta) {
- this.delta = delta;
- }
-
+//TODO Move to integration test directory when Maven build is not supported anymore.
Review Comment:
I'll add it, thank you
--
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] tkalkirill commented on a diff in pull request #1411: IGNITE-17871 JDKMarshaller replaced with OptimizedMarshaller for RAFT commands.
Posted by GitBox <gi...@apache.org>.
tkalkirill commented on code in PR #1411:
URL: https://github.com/apache/ignite-3/pull/1411#discussion_r1041869693
##########
modules/raft/src/integrationTest/java/org/apache/ignite/raft/server/counter/GetValueCommand.java:
##########
@@ -18,9 +18,14 @@
package org.apache.ignite.raft.server.counter;
import org.apache.ignite.internal.raft.ReadCommand;
+import org.apache.ignite.network.annotations.Transferable;
/**
* Get a value command.
*/
-public class GetValueCommand implements ReadCommand {
+@Transferable(1_000)
Review Comment:
We do not have a single place where all types of messages?
##########
modules/raft/src/main/java/org/apache/ignite/internal/raft/server/impl/JraftServerImpl.java:
##########
@@ -113,6 +114,9 @@ public class JraftServerImpl implements RaftServer {
/** Request executor. */
private ExecutorService requestExecutor;
+ /** Marshaller. */
Review Comment:
Marshaller for what?
--
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] vldpyatkov commented on a diff in pull request #1411: IGNITE-17871 JDKMarshaller replaced with OptimizedMarshaller for RAFT commands.
Posted by GitBox <gi...@apache.org>.
vldpyatkov commented on code in PR #1411:
URL: https://github.com/apache/ignite-3/pull/1411#discussion_r1043193784
##########
modules/raft/src/testFixtures/java/org/apache/ignite/raft/server/counter/IncrementAndGetCommand.java:
##########
@@ -18,29 +18,22 @@
package org.apache.ignite.raft.server.counter;
import org.apache.ignite.internal.raft.WriteCommand;
+import org.apache.ignite.network.annotations.Transferable;
+import org.apache.ignite.raft.messages.TestMessageGroup;
+import org.apache.ignite.raft.messages.TestRaftMessagesFactory;
/**
* Increment and get command.
*/
-public class IncrementAndGetCommand implements WriteCommand {
- /**
- * The delta.
- */
- private final long delta;
-
- /**
- * Constructor.
- *
- * @param delta The delta.
- */
- public IncrementAndGetCommand(long delta) {
- this.delta = delta;
- }
-
+//TODO Move to integration test directory when Maven build is not supported anymore.
+@Transferable(TestMessageGroup.INCREMENT_AND_GET_COMMAND)
+public interface IncrementAndGetCommand extends WriteCommand {
/**
* Returns the delta.
*/
- public long delta() {
- return delta;
+ long delta();
+
+ static IncrementAndGetCommand incrementAndGetCommand(long delta) {
Review Comment:
Why do you use a static method to create an instance, if there is a factory?
This looks like contradictory patterns to me.
##########
modules/raft/src/testFixtures/java/org/apache/ignite/raft/server/counter/IncrementAndGetCommand.java:
##########
@@ -18,29 +18,22 @@
package org.apache.ignite.raft.server.counter;
import org.apache.ignite.internal.raft.WriteCommand;
+import org.apache.ignite.network.annotations.Transferable;
+import org.apache.ignite.raft.messages.TestMessageGroup;
+import org.apache.ignite.raft.messages.TestRaftMessagesFactory;
/**
* Increment and get command.
*/
-public class IncrementAndGetCommand implements WriteCommand {
- /**
- * The delta.
- */
- private final long delta;
-
- /**
- * Constructor.
- *
- * @param delta The delta.
- */
- public IncrementAndGetCommand(long delta) {
- this.delta = delta;
- }
-
+//TODO Move to integration test directory when Maven build is not supported anymore.
Review Comment:
There is "todo" without a ticket number.
--
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 #1411: IGNITE-17871 JDKMarshaller replaced with OptimizedMarshaller for RAFT commands.
Posted by GitBox <gi...@apache.org>.
ibessonov merged PR #1411:
URL: https://github.com/apache/ignite-3/pull/1411
--
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