ascherbakoff commented on code in PR #4227:
URL: https://github.com/apache/ignite-3/pull/4227#discussion_r1721464885
##########
modules/raft/src/main/java/org/apache/ignite/internal/raft/RaftGroupServiceImpl.java:
##########
@@ -171,19 +174,40 @@ public static CompletableFuture<RaftGroupService> start(
ScheduledExecutorService executor,
Marshaller commandsMarshaller
) {
- var service = new RaftGroupServiceImpl(
- groupId,
- cluster,
- factory,
- configuration,
- membersConfiguration,
- null,
- executor,
- commandsMarshaller
- );
+ boolean inBenchmark =
IgniteSystemProperties.getBoolean(IgniteSystemProperties.SKIP_REPLICATION_IN_BENCHMARK,
false);
+
+ RaftGroupServiceImpl service;
+ if (inBenchmark) {
+ service = new RaftGroupServiceImpl(
+ groupId,
+ cluster,
+ factory,
+ configuration,
+ membersConfiguration,
+ null,
+ executor,
+ commandsMarshaller
+ ) {
+ @Override
+ public <R> CompletableFuture<R> run(Command cmd) {
+ return
cmd.getClass().getSimpleName().contains("UpdateCommand") ?
nullCompletedFuture() : super.run(cmd);
Review Comment:
This is not possible to fix due to dependency issues. UpdateCommand is not
available in raft module.
##########
modules/core/src/main/java/org/apache/ignite/internal/lang/IgniteSystemProperties.java:
##########
@@ -73,6 +73,12 @@ public final class IgniteSystemProperties {
/** Name of the property controlling whether, when a thread assertion is
triggered, it should also be written to the log. */
public static final String THREAD_ASSERTIONS_LOG_BEFORE_THROWING =
"THREAD_ASSERTIONS_LOG_BEFORE_THROWING";
+ /** Skip replication in a benchmark. */
+ public static final String SKIP_REPLICATION_IN_BENCHMARK =
"SKIP_REPLICATION_IN_BENCHMARK";
+
+ /** Skip storage update in a benchmark. */
+ public static final String SKIP_STORAGE_UPDATE_IN_BENCHMARK =
"SKIP_STORAGE_UPDATE_IN_BENCHMARK";
Review Comment:
🆗
--
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]