nizhikov commented on code in PR #13668:
URL: https://github.com/apache/ignite/pull/13668#discussion_r4247767087
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java:
##########
Review Comment:
Fixed in 6a2e104: `checkxModuleEnabled()` throws `INDEXING_DISABLED_MSG`
now. The old remedy about `QueryEnginesConfiguration` was dropped: a node
reaching this branch has no engine on the classpath, so adding a module is the
only fix. Covered by `NoQueryEngineNodeTest#testJdbc`.
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxyImpl.java:
##########
@@ -891,10 +891,18 @@ private void validate(Query qry) {
throw new CacheException("Indexing is disabled for cache: " +
cacheName +
". Use setIndexedTypes or setTypeMetadata methods on
CacheConfiguration to enable.");
- if (!ctx.kernalContext().query().moduleEnabled() &&
- (qry instanceof SqlQuery || qry instanceof SqlFieldsQuery || qry
instanceof TextQuery))
+ if (!ctx.kernalContext().query().moduleEnabled() && qry instanceof
SqlFieldsQuery) {
throw new CacheException("Failed to execute query. Add module
'ignite-indexing' to the classpath " +
- "of all Ignite nodes or configure any query engine.");
+ "of all Ignite nodes or configure any query engine.");
+ }
+
+ if ((qry instanceof SqlQuery || qry instanceof TextQuery) &&
!ctx.kernalContext().query().indexingEnabled()) {
+ throw new CacheException("Failed to execute query. '" +
qry.getClass().getSimpleName() + "' is supported " +
Review Comment:
Fixed in 6a2e104: `IgniteCacheProxyImpl.NO_QRY_ENGINE_MSG` is public and
used by the tests. The H2-only message is built from the query class name, so
the tests keep its fixed fragment as a constant.
--
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]