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 2021/03/04 11:56:12 UTC
[GitHub] [ignite] alex-plekhanov opened a new pull request #8855: IGNITE-14019 Fix query on lazy caches on client node
alex-plekhanov opened a new pull request #8855:
URL: https://github.com/apache/ignite/pull/8855
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 [TC.Bot: Check PR](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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] ygerzhedovich commented on a change in pull request #8855: IGNITE-14019 Fix query on lazy caches on client node
Posted by GitBox <gi...@apache.org>.
ygerzhedovich commented on a change in pull request #8855:
URL: https://github.com/apache/ignite/pull/8855#discussion_r587584832
##########
File path: modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/schema/IgniteTableImpl.java
##########
@@ -59,16 +62,21 @@
/** */
private final Statistic statistic;
+ /** */
+ private final GridKernalContext ctx;
+
/** */
private volatile GridH2Table tbl;
/** */
private final Map<String, IgniteIndex> indexes = new ConcurrentHashMap<>();
/**
- * @param desc Table descriptor.
+ * @param ctx Kernal context.
+ * @param desc Table descriptor.
*/
- public IgniteTableImpl(TableDescriptor desc) {
+ public IgniteTableImpl(GridKernalContext ctx, TableDescriptor desc) {
Review comment:
GridCacheProcessor and GridQueryProcessor required, not whole KernalContext, isn't it?
I understand that it widely used practice in Ignite when we pass CTX everywhere. However, it makes code more coupled. Most of the code will be moved into Ignite 3.0, let's try to make it better from 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] AMashenkov commented on a change in pull request #8855: IGNITE-14019 Fix query on lazy caches on client node
Posted by GitBox <gi...@apache.org>.
AMashenkov commented on a change in pull request #8855:
URL: https://github.com/apache/ignite/pull/8855#discussion_r587427912
##########
File path: modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/schema/SchemaHolderImpl.java
##########
@@ -125,6 +128,8 @@ public AffinityIdentity(AffinityFunction aff, int backups, IgnitePredicate<Clust
public SchemaHolderImpl(GridKernalContext ctx) {
super(ctx);
+ this.ctx = ctx;
Review comment:
KernalContext is always passed to the parent class,
Does it make sense to push 'ctx' field to the parent class?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] alex-plekhanov commented on a change in pull request #8855: IGNITE-14019 Fix query on lazy caches on client node
Posted by GitBox <gi...@apache.org>.
alex-plekhanov commented on a change in pull request #8855:
URL: https://github.com/apache/ignite/pull/8855#discussion_r587472941
##########
File path: modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/schema/IgniteTableImpl.java
##########
@@ -59,16 +62,21 @@
/** */
private final Statistic statistic;
+ /** */
+ private final GridKernalContext ctx;
+
/** */
private volatile GridH2Table tbl;
/** */
private final Map<String, IgniteIndex> indexes = new ConcurrentHashMap<>();
/**
- * @param desc Table descriptor.
+ * @param ctx Kernal context.
+ * @param desc Table descriptor.
*/
- public IgniteTableImpl(TableDescriptor desc) {
+ public IgniteTableImpl(GridKernalContext ctx, TableDescriptor desc) {
Review comment:
But why? IgniteTableImpl already uses KernelContext, but obtains it from cache context (which is not always initialized). Also, there is no other way to get GridCacheProcessor to start lazy caches.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] AMashenkov commented on a change in pull request #8855: IGNITE-14019 Fix query on lazy caches on client node
Posted by GitBox <gi...@apache.org>.
AMashenkov commented on a change in pull request #8855:
URL: https://github.com/apache/ignite/pull/8855#discussion_r587427912
##########
File path: modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/schema/SchemaHolderImpl.java
##########
@@ -125,6 +128,8 @@ public AffinityIdentity(AffinityFunction aff, int backups, IgnitePredicate<Clust
public SchemaHolderImpl(GridKernalContext ctx) {
super(ctx);
+ this.ctx = ctx;
Review comment:
KernalContext is always passed to the parent class,
Does it make sense to push 'ctx' field as well?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] alex-plekhanov commented on a change in pull request #8855: IGNITE-14019 Fix query on lazy caches on client node
Posted by GitBox <gi...@apache.org>.
alex-plekhanov commented on a change in pull request #8855:
URL: https://github.com/apache/ignite/pull/8855#discussion_r587725778
##########
File path: modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/schema/IgniteTableImpl.java
##########
@@ -59,16 +62,21 @@
/** */
private final Statistic statistic;
+ /** */
+ private final GridKernalContext ctx;
+
/** */
private volatile GridH2Table tbl;
/** */
private final Map<String, IgniteIndex> indexes = new ConcurrentHashMap<>();
/**
- * @param desc Table descriptor.
+ * @param ctx Kernal context.
+ * @param desc Table descriptor.
*/
- public IgniteTableImpl(TableDescriptor desc) {
+ public IgniteTableImpl(GridKernalContext ctx, TableDescriptor desc) {
Review comment:
I think if at least two components are required it's better to pass only the KernalContext. Passing two components and store them in two fields only brings unnecessary code complexity.
I can also pass and store only one of these components and get another from it (for example `cacheProc.context().kernelContext().query()`) but it looks weird.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] ygerzhedovich commented on a change in pull request #8855: IGNITE-14019 Fix query on lazy caches on client node
Posted by GitBox <gi...@apache.org>.
ygerzhedovich commented on a change in pull request #8855:
URL: https://github.com/apache/ignite/pull/8855#discussion_r587457854
##########
File path: modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/schema/IgniteTableImpl.java
##########
@@ -59,16 +62,21 @@
/** */
private final Statistic statistic;
+ /** */
+ private final GridKernalContext ctx;
+
/** */
private volatile GridH2Table tbl;
/** */
private final Map<String, IgniteIndex> indexes = new ConcurrentHashMap<>();
/**
- * @param desc Table descriptor.
+ * @param ctx Kernal context.
+ * @param desc Table descriptor.
*/
- public IgniteTableImpl(TableDescriptor desc) {
+ public IgniteTableImpl(GridKernalContext ctx, TableDescriptor desc) {
Review comment:
Let's avoid use KernalContext
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] alex-plekhanov commented on a change in pull request #8855: IGNITE-14019 Fix query on lazy caches on client node
Posted by GitBox <gi...@apache.org>.
alex-plekhanov commented on a change in pull request #8855:
URL: https://github.com/apache/ignite/pull/8855#discussion_r587441642
##########
File path: modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/schema/SchemaHolderImpl.java
##########
@@ -125,6 +128,8 @@ public AffinityIdentity(AffinityFunction aff, int backups, IgnitePredicate<Clust
public SchemaHolderImpl(GridKernalContext ctx) {
super(ctx);
+ this.ctx = ctx;
Review comment:
Currently, only `SchemaHolderImpl` requires kernal context. We can move it to the parent class in the future when at least one more service will need 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] alex-plekhanov closed pull request #8855: IGNITE-14019 Fix query on lazy caches on client node
Posted by GitBox <gi...@apache.org>.
alex-plekhanov closed pull request #8855:
URL: https://github.com/apache/ignite/pull/8855
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org