You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "lowka (via GitHub)" <gi...@apache.org> on 2024/02/12 10:18:40 UTC
[PR] IGNITE-21504: Sql. PlanningCacheMetricsTest.plannerCacheStatisticsTest is flaky. [ignite-3]
lowka opened a new pull request, #3203:
URL: https://github.com/apache/ignite-3/pull/3203
Fixes tests by running eviction tasks in the current thread.
https://issues.apache.org/jira/browse/IGNITE-21504
---
Thank you for submitting the pull request.
To streamline the review process of the patch and ensure better code quality
we ask both an author and a reviewer to verify the following:
### The Review Checklist
- [ ] **Formal criteria:** TC status, codestyle, mandatory documentation. Also make sure to complete the following:
\- 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 description of the JIRA ticket explains WHAT was made, WHY and 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.
- [ ] **Design:** new code conforms with the design principles of the components it is added to.
- [ ] **Patch quality:** patch cannot be split into smaller pieces, its size must be reasonable.
- [ ] **Code quality:** code is clean and readable, necessary developer documentation is added if needed.
- [ ] **Tests code quality:** test set covers positive/negative scenarios, happy/edge cases. Tests are effective in terms of execution time and resources.
### Notes
- [Apache Ignite Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Java+Code+Style+Guide)
--
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-21504: Sql. PlanningCacheMetricsTest.plannerCacheStatisticsTest is flaky. [ignite-3]
Posted by "xtern (via GitHub)" <gi...@apache.org>.
xtern merged PR #3203:
URL: https://github.com/apache/ignite-3/pull/3203
--
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-21504: Sql. PlanningCacheMetricsTest.plannerCacheStatisticsTest is flaky. [ignite-3]
Posted by "xtern (via GitHub)" <gi...@apache.org>.
xtern commented on code in PR #3203:
URL: https://github.com/apache/ignite-3/pull/3203#discussion_r1487505799
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/util/cache/CaffeineCacheFactory.java:
##########
@@ -20,19 +20,35 @@
import com.github.benmanes.caffeine.cache.Caffeine;
import com.github.benmanes.caffeine.cache.RemovalCause;
import com.github.benmanes.caffeine.cache.stats.CacheStats;
+import java.util.concurrent.Executor;
import java.util.function.BiFunction;
import java.util.function.Function;
import java.util.function.Predicate;
import org.checkerframework.checker.index.qual.NonNegative;
import org.jetbrains.annotations.Nullable;
+import org.jetbrains.annotations.TestOnly;
/**
* Factory that creates caches backed by {@link Caffeine} cache.
*/
public class CaffeineCacheFactory implements CacheFactory {
public static final CacheFactory INSTANCE = new CaffeineCacheFactory();
+ @Nullable
+ private final Executor executor;
+
private CaffeineCacheFactory() {
+ this.executor = null;
Review Comment:
```suggestion
this(null);
```
:thinking:
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/util/cache/CaffeineCacheFactory.java:
##########
@@ -20,19 +20,35 @@
import com.github.benmanes.caffeine.cache.Caffeine;
import com.github.benmanes.caffeine.cache.RemovalCause;
import com.github.benmanes.caffeine.cache.stats.CacheStats;
+import java.util.concurrent.Executor;
import java.util.function.BiFunction;
import java.util.function.Function;
import java.util.function.Predicate;
import org.checkerframework.checker.index.qual.NonNegative;
import org.jetbrains.annotations.Nullable;
+import org.jetbrains.annotations.TestOnly;
/**
* Factory that creates caches backed by {@link Caffeine} cache.
*/
public class CaffeineCacheFactory implements CacheFactory {
public static final CacheFactory INSTANCE = new CaffeineCacheFactory();
+ @Nullable
+ private final Executor executor;
+
private CaffeineCacheFactory() {
+ this.executor = null;
+ }
+
+ private CaffeineCacheFactory(@Nullable Executor executor) {
+ this.executor = executor;
+ }
+
+ /** Creates a cache factory with the given executor for running auxiliary tasks. */
+ @TestOnly
+ public static CacheFactory create(@Nullable Executor executor) {
Review Comment:
```suggestion
public static CacheFactory create(Executor executor) {
```
--
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-21504: Sql. PlanningCacheMetricsTest.plannerCacheStatisticsTest is flaky. [ignite-3]
Posted by "xtern (via GitHub)" <gi...@apache.org>.
xtern commented on code in PR #3203:
URL: https://github.com/apache/ignite-3/pull/3203#discussion_r1487505246
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/util/cache/CaffeineCacheFactory.java:
##########
@@ -20,19 +20,35 @@
import com.github.benmanes.caffeine.cache.Caffeine;
import com.github.benmanes.caffeine.cache.RemovalCause;
import com.github.benmanes.caffeine.cache.stats.CacheStats;
+import java.util.concurrent.Executor;
import java.util.function.BiFunction;
import java.util.function.Function;
import java.util.function.Predicate;
import org.checkerframework.checker.index.qual.NonNegative;
import org.jetbrains.annotations.Nullable;
+import org.jetbrains.annotations.TestOnly;
/**
* Factory that creates caches backed by {@link Caffeine} cache.
*/
public class CaffeineCacheFactory implements CacheFactory {
public static final CacheFactory INSTANCE = new CaffeineCacheFactory();
+ @Nullable
+ private final Executor executor;
+
private CaffeineCacheFactory() {
+ this.executor = null;
+ }
+
+ private CaffeineCacheFactory(@Nullable Executor executor) {
+ this.executor = executor;
+ }
+
+ /** Creates a cache factory with the given executor for running auxiliary tasks. */
+ @TestOnly
+ public static CacheFactory create(@Nullable Executor executor) {
Review Comment:
```suggestion
public static CacheFactory create(Executor executor) {
```
As I understand, this method only exists for passing the executor, so it's unclear why anyone would use it with a `null` argument.
--
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