You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "chesnokoff (via GitHub)" <gi...@apache.org> on 2026/03/28 08:54:56 UTC
[PR] IGNITE-27818 PerfStat: Add cache store operations [ignite]
chesnokoff opened a new pull request, #12954:
URL: https://github.com/apache/ignite/pull/12954
Thank you for submitting the pull request to the Apache Ignite.
In order to streamline the review of the contribution
we ask you to ensure the following steps have been taken:
### The Contribution Checklist
- [ ] There is a single JIRA ticket related to the pull request.
- [ ] The web-link to the pull request is attached to the JIRA ticket.
- [ ] The JIRA ticket has the _Patch Available_ state.
- [ ] The pull request body describes changes that have been made.
The description explains _WHAT_ and _WHY_ was made instead of _HOW_.
- [ ] The pull request title is treated as the final commit message.
The following pattern must be used: `IGNITE-XXXX Change summary` where `XXXX` - number of JIRA issue.
- [ ] A reviewer has been mentioned through the JIRA comments
(see [the Maintainers list](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute#HowtoContribute-ReviewProcessandMaintainers))
- [ ] The pull request has been checked by the Teamcity Bot and
the `green visa` attached to the JIRA ticket (see tab `PR Check` at [TC.Bot - Instance 1](https://tcbot2.sbt-ignite-dev.ru/prs.html) or [TC.Bot - Instance 2](https://mtcga.gridgain.com/prs.html))
### Notes
- [How to Contribute](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute)
- [Coding abbreviation rules](https://cwiki.apache.org/confluence/display/IGNITE/Abbreviation+Rules)
- [Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines)
- [Apache Ignite Teamcity Bot](https://cwiki.apache.org/confluence/display/IGNITE/Apache+Ignite+Teamcity+Bot)
If you need any help, please email dev@ignite.apache.org or ask anу advice on http://asf.slack.com _#ignite_ channel.
--
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
Re: [PR] IGNITE-27818 PerfStat: Add cache store operations [ignite]
Posted by "chesnokoff (via GitHub)" <gi...@apache.org>.
chesnokoff commented on code in PR #12954:
URL: https://github.com/apache/ignite/pull/12954#discussion_r3004563533
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java:
##########
Review Comment:
the same approach is relevant for other operations with write-behind cache
--
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
Re: [PR] IGNITE-27818 PerfStat: Add cache store operations [ignite]
Posted by "zstan (via GitHub)" <gi...@apache.org>.
zstan commented on code in PR #12954:
URL: https://github.com/apache/ignite/pull/12954#discussion_r3007659927
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java:
##########
@@ -338,6 +344,13 @@ private CacheStore cacheStoreWrapper(GridKernalContext ctx,
throw new IgniteCheckedException(new CacheLoaderException(e));
}
finally {
+ if (perfStatEnabled)
Review Comment:
seems we can reduce additional code amount and implement it as:
GridCacheAdapter#writeStatistics, wdyt ?
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java:
##########
Review Comment:
no need a context here, just pass lambda with 2 params: OperationType op, long start.
##########
modules/core/src/test/java/org/apache/ignite/internal/processors/performancestatistics/PerformanceStatisticsCacheStoreTest.java:
##########
@@ -0,0 +1,227 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.performancestatistics;
+
+import java.util.Collection;
+import java.util.EnumMap;
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+import javax.cache.Cache;
+import javax.cache.configuration.FactoryBuilder;
+import javax.cache.integration.CacheLoaderException;
+import javax.cache.integration.CacheWriterException;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.cache.store.CacheStore;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.IgniteEx;
+import org.apache.ignite.internal.util.typedef.internal.CU;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.lang.IgniteBiInClosure;
+import org.apache.ignite.testframework.junits.GridAbstractTest;
+import org.jetbrains.annotations.Nullable;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+import static org.apache.ignite.internal.processors.performancestatistics.OperationType.CACHE_DELETE;
+import static org.apache.ignite.internal.processors.performancestatistics.OperationType.CACHE_DELETE_ALL;
+import static org.apache.ignite.internal.processors.performancestatistics.OperationType.CACHE_LOAD;
+import static org.apache.ignite.internal.processors.performancestatistics.OperationType.CACHE_LOAD_ALL;
+import static org.apache.ignite.internal.processors.performancestatistics.OperationType.CACHE_LOAD_CACHE;
+import static org.apache.ignite.internal.processors.performancestatistics.OperationType.CACHE_WRITE;
+import static org.apache.ignite.internal.processors.performancestatistics.OperationType.CACHE_WRITE_ALL;
+import static org.junit.runners.Parameterized.Parameter;
+import static org.junit.runners.Parameterized.Parameters;
+
+/** Tests performance statistics for cache store operations. */
+@RunWith(Parameterized.class)
+public class PerformanceStatisticsCacheStoreTest extends AbstractPerformanceStatisticsTest {
+ /** Cache store operation types. */
+ private static final Set<OperationType> CACHE_STORE_OPS = EnumSet.of(
+ CACHE_LOAD,
+ CACHE_LOAD_ALL,
+ CACHE_LOAD_CACHE,
+ CACHE_WRITE,
+ CACHE_WRITE_ALL,
+ CACHE_DELETE,
+ CACHE_DELETE_ALL
+ );
+
+ /** Ignite. */
+ private IgniteEx ignite;
+
+ /** Test cache. */
+ private IgniteCache<Integer, Integer> cache;
+
+ /** Write-behind mode flag. */
+ @Parameter
+ public boolean writeBehind;
+
+ /** */
+ @Parameters(name = "writeBehind={0}")
+ public static List<Boolean> parameters() {
+ return List.of(false, true);
+ }
+
+ /** {@inheritDoc} */
+ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
+ IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
+
+ cfg.setCacheConfiguration(GridAbstractTest.<Integer, Integer>defaultCacheConfiguration()
+ .setReadThrough(true)
+ .setWriteThrough(true)
+ .setWriteBehindEnabled(writeBehind)
+ .setCacheStoreFactory(FactoryBuilder.factoryOf(TestCacheStore.class))
Review Comment:
```suggestion
.setCacheStoreFactory(FactoryBuilder.factoryOf(MapCacheStoreStrategy.MapCacheStore.class))
```
##########
modules/core/src/test/java/org/apache/ignite/internal/processors/performancestatistics/PerformanceStatisticsCacheStoreTest.java:
##########
@@ -0,0 +1,227 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.performancestatistics;
+
+import java.util.Collection;
+import java.util.EnumMap;
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+import javax.cache.Cache;
+import javax.cache.configuration.FactoryBuilder;
+import javax.cache.integration.CacheLoaderException;
+import javax.cache.integration.CacheWriterException;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.cache.store.CacheStore;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.IgniteEx;
+import org.apache.ignite.internal.util.typedef.internal.CU;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.lang.IgniteBiInClosure;
+import org.apache.ignite.testframework.junits.GridAbstractTest;
+import org.jetbrains.annotations.Nullable;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+import static org.apache.ignite.internal.processors.performancestatistics.OperationType.CACHE_DELETE;
+import static org.apache.ignite.internal.processors.performancestatistics.OperationType.CACHE_DELETE_ALL;
+import static org.apache.ignite.internal.processors.performancestatistics.OperationType.CACHE_LOAD;
+import static org.apache.ignite.internal.processors.performancestatistics.OperationType.CACHE_LOAD_ALL;
+import static org.apache.ignite.internal.processors.performancestatistics.OperationType.CACHE_LOAD_CACHE;
+import static org.apache.ignite.internal.processors.performancestatistics.OperationType.CACHE_WRITE;
+import static org.apache.ignite.internal.processors.performancestatistics.OperationType.CACHE_WRITE_ALL;
+import static org.junit.runners.Parameterized.Parameter;
+import static org.junit.runners.Parameterized.Parameters;
+
+/** Tests performance statistics for cache store operations. */
+@RunWith(Parameterized.class)
+public class PerformanceStatisticsCacheStoreTest extends AbstractPerformanceStatisticsTest {
+ /** Cache store operation types. */
+ private static final Set<OperationType> CACHE_STORE_OPS = EnumSet.of(
+ CACHE_LOAD,
+ CACHE_LOAD_ALL,
+ CACHE_LOAD_CACHE,
+ CACHE_WRITE,
+ CACHE_WRITE_ALL,
+ CACHE_DELETE,
+ CACHE_DELETE_ALL
+ );
+
+ /** Ignite. */
+ private IgniteEx ignite;
+
+ /** Test cache. */
+ private IgniteCache<Integer, Integer> cache;
+
+ /** Write-behind mode flag. */
+ @Parameter
+ public boolean writeBehind;
+
+ /** */
+ @Parameters(name = "writeBehind={0}")
+ public static List<Boolean> parameters() {
+ return List.of(false, true);
+ }
+
+ /** {@inheritDoc} */
+ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
+ IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
+
+ cfg.setCacheConfiguration(GridAbstractTest.<Integer, Integer>defaultCacheConfiguration()
+ .setReadThrough(true)
+ .setWriteThrough(true)
+ .setWriteBehindEnabled(writeBehind)
Review Comment:
why we need this param if no part of WriteBehind logic is tested for now ?
--
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
Re: [PR] IGNITE-27818 PerfStat: Add cache store operations [ignite]
Posted by "chesnokoff (via GitHub)" <gi...@apache.org>.
chesnokoff commented on code in PR #12954:
URL: https://github.com/apache/ignite/pull/12954#discussion_r3008547163
##########
modules/core/src/test/java/org/apache/ignite/internal/processors/performancestatistics/PerformanceStatisticsCacheStoreTest.java:
##########
@@ -0,0 +1,227 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.performancestatistics;
+
+import java.util.Collection;
+import java.util.EnumMap;
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+import javax.cache.Cache;
+import javax.cache.configuration.FactoryBuilder;
+import javax.cache.integration.CacheLoaderException;
+import javax.cache.integration.CacheWriterException;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.cache.store.CacheStore;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.IgniteEx;
+import org.apache.ignite.internal.util.typedef.internal.CU;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.lang.IgniteBiInClosure;
+import org.apache.ignite.testframework.junits.GridAbstractTest;
+import org.jetbrains.annotations.Nullable;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+import static org.apache.ignite.internal.processors.performancestatistics.OperationType.CACHE_DELETE;
+import static org.apache.ignite.internal.processors.performancestatistics.OperationType.CACHE_DELETE_ALL;
+import static org.apache.ignite.internal.processors.performancestatistics.OperationType.CACHE_LOAD;
+import static org.apache.ignite.internal.processors.performancestatistics.OperationType.CACHE_LOAD_ALL;
+import static org.apache.ignite.internal.processors.performancestatistics.OperationType.CACHE_LOAD_CACHE;
+import static org.apache.ignite.internal.processors.performancestatistics.OperationType.CACHE_WRITE;
+import static org.apache.ignite.internal.processors.performancestatistics.OperationType.CACHE_WRITE_ALL;
+import static org.junit.runners.Parameterized.Parameter;
+import static org.junit.runners.Parameterized.Parameters;
+
+/** Tests performance statistics for cache store operations. */
+@RunWith(Parameterized.class)
+public class PerformanceStatisticsCacheStoreTest extends AbstractPerformanceStatisticsTest {
+ /** Cache store operation types. */
+ private static final Set<OperationType> CACHE_STORE_OPS = EnumSet.of(
+ CACHE_LOAD,
+ CACHE_LOAD_ALL,
+ CACHE_LOAD_CACHE,
+ CACHE_WRITE,
+ CACHE_WRITE_ALL,
+ CACHE_DELETE,
+ CACHE_DELETE_ALL
+ );
+
+ /** Ignite. */
+ private IgniteEx ignite;
+
+ /** Test cache. */
+ private IgniteCache<Integer, Integer> cache;
+
+ /** Write-behind mode flag. */
+ @Parameter
+ public boolean writeBehind;
+
+ /** */
+ @Parameters(name = "writeBehind={0}")
+ public static List<Boolean> parameters() {
+ return List.of(false, true);
+ }
+
+ /** {@inheritDoc} */
+ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
+ IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
+
+ cfg.setCacheConfiguration(GridAbstractTest.<Integer, Integer>defaultCacheConfiguration()
+ .setReadThrough(true)
+ .setWriteThrough(true)
+ .setWriteBehindEnabled(writeBehind)
+ .setCacheStoreFactory(FactoryBuilder.factoryOf(TestCacheStore.class))
Review Comment:
Resolved: TestCacheStore removed and replaced with MapCacheStoreStrategy.MapCacheStore
--
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
Re: [PR] IGNITE-27818 PerfStat: Add cache store operations [ignite]
Posted by "chesnokoff (via GitHub)" <gi...@apache.org>.
chesnokoff commented on code in PR #12954:
URL: https://github.com/apache/ignite/pull/12954#discussion_r3004559618
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java:
##########
Review Comment:
In addition, we can add `CACHE_LOAD_ALL_STORE` or `CACHE_LOAD_ALL_ACTUAL` operation type in next pr
--
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
Re: [PR] IGNITE-27818 PerfStat: Add cache store operations [ignite]
Posted by "zstan (via GitHub)" <gi...@apache.org>.
zstan commented on PR #12954:
URL: https://github.com/apache/ignite/pull/12954#issuecomment-4152478746
Also we need follow up issue for documentation.
--
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
Re: [PR] IGNITE-27818 PerfStat: Add cache store operations [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12954:
URL: https://github.com/apache/ignite/pull/12954#issuecomment-4152250916
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12954) **Quality Gate failed**
Failed conditions
 [3 New Code Smells](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12954) (required ≤ 1)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12954)
##
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarQube for IDE](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=pull-request)
--
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
Re: [PR] IGNITE-27818 PerfStat: Add cache store operations [ignite]
Posted by "chesnokoff (via GitHub)" <gi...@apache.org>.
chesnokoff commented on code in PR #12954:
URL: https://github.com/apache/ignite/pull/12954#discussion_r3004547730
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java:
##########
Review Comment:
There is one implementation detail to consider. In the write-behind scenario, `loadAll` may not actually call the underlying cache store, but instead return entries from the `writeCache` (see `GridCacheWriteBehindStore#loadAll`, specifically the `remaining` variable).
As a result, we currently log logical calls to the cache store rather than physical ones. This approach is justified by the following:
- It is still possible to estimate whether a call was real based on its duration
- `GridCacheWriteBehindStore` does not have straightforward access to the Ignite context required to invoke performance statistics operations
--
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
Re: [PR] IGNITE-27818 PerfStat: Add cache store operations [ignite]
Posted by "chesnokoff (via GitHub)" <gi...@apache.org>.
chesnokoff commented on code in PR #12954:
URL: https://github.com/apache/ignite/pull/12954#discussion_r3008541788
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java:
##########
@@ -338,6 +344,13 @@ private CacheStore cacheStoreWrapper(GridKernalContext ctx,
throw new IgniteCheckedException(new CacheLoaderException(e));
}
finally {
+ if (perfStatEnabled)
Review Comment:
Resolved: GridCacheAdapter#writeStatistics introduced and reused
--
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
Re: [PR] IGNITE-27818 PerfStat: Add cache store operations [ignite]
Posted by "chesnokoff (via GitHub)" <gi...@apache.org>.
chesnokoff commented on code in PR #12954:
URL: https://github.com/apache/ignite/pull/12954#discussion_r3008552268
##########
modules/core/src/test/java/org/apache/ignite/internal/processors/performancestatistics/PerformanceStatisticsCacheStoreTest.java:
##########
@@ -0,0 +1,227 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.performancestatistics;
+
+import java.util.Collection;
+import java.util.EnumMap;
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+import javax.cache.Cache;
+import javax.cache.configuration.FactoryBuilder;
+import javax.cache.integration.CacheLoaderException;
+import javax.cache.integration.CacheWriterException;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.cache.store.CacheStore;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.IgniteEx;
+import org.apache.ignite.internal.util.typedef.internal.CU;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.lang.IgniteBiInClosure;
+import org.apache.ignite.testframework.junits.GridAbstractTest;
+import org.jetbrains.annotations.Nullable;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+import static org.apache.ignite.internal.processors.performancestatistics.OperationType.CACHE_DELETE;
+import static org.apache.ignite.internal.processors.performancestatistics.OperationType.CACHE_DELETE_ALL;
+import static org.apache.ignite.internal.processors.performancestatistics.OperationType.CACHE_LOAD;
+import static org.apache.ignite.internal.processors.performancestatistics.OperationType.CACHE_LOAD_ALL;
+import static org.apache.ignite.internal.processors.performancestatistics.OperationType.CACHE_LOAD_CACHE;
+import static org.apache.ignite.internal.processors.performancestatistics.OperationType.CACHE_WRITE;
+import static org.apache.ignite.internal.processors.performancestatistics.OperationType.CACHE_WRITE_ALL;
+import static org.junit.runners.Parameterized.Parameter;
+import static org.junit.runners.Parameterized.Parameters;
+
+/** Tests performance statistics for cache store operations. */
+@RunWith(Parameterized.class)
+public class PerformanceStatisticsCacheStoreTest extends AbstractPerformanceStatisticsTest {
+ /** Cache store operation types. */
+ private static final Set<OperationType> CACHE_STORE_OPS = EnumSet.of(
+ CACHE_LOAD,
+ CACHE_LOAD_ALL,
+ CACHE_LOAD_CACHE,
+ CACHE_WRITE,
+ CACHE_WRITE_ALL,
+ CACHE_DELETE,
+ CACHE_DELETE_ALL
+ );
+
+ /** Ignite. */
+ private IgniteEx ignite;
+
+ /** Test cache. */
+ private IgniteCache<Integer, Integer> cache;
+
+ /** Write-behind mode flag. */
+ @Parameter
+ public boolean writeBehind;
+
+ /** */
+ @Parameters(name = "writeBehind={0}")
+ public static List<Boolean> parameters() {
+ return List.of(false, true);
+ }
+
+ /** {@inheritDoc} */
+ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
+ IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
+
+ cfg.setCacheConfiguration(GridAbstractTest.<Integer, Integer>defaultCacheConfiguration()
+ .setReadThrough(true)
+ .setWriteThrough(true)
+ .setWriteBehindEnabled(writeBehind)
Review Comment:
Resolved writeBehind parameter removed and logic of PerformanceStatisticsCacheStoreTest moved to PerformanceStatisticsSelfTest
--
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
Re: [PR] IGNITE-27818 PerfStat: Add cache store operations [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12954:
URL: https://github.com/apache/ignite/pull/12954#issuecomment-4153893514
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12954) **Quality Gate failed**
Failed conditions
 [8 New Code Smells](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12954) (required ≤ 1)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12954)
##
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarQube for IDE](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=pull-request)
--
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
Re: [PR] IGNITE-27818 PerfStat: Add cache store operations [ignite]
Posted by "zstan (via GitHub)" <gi...@apache.org>.
zstan merged PR #12954:
URL: https://github.com/apache/ignite/pull/12954
--
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