IGNITE-2715: No more spam from within GridQueryProcessor about missing field for BinaryProperty. This closes #514.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/78728db6 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/78728db6 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/78728db6 Branch: refs/heads/ignite-1186 Commit: 78728db680a6d0bf444cb08c5f8cc8708c934a94 Parents: 42572ad Author: vozerov-gridgain <[email protected]> Authored: Fri Feb 26 14:45:30 2016 +0300 Committer: vozerov-gridgain <[email protected]> Committed: Fri Feb 26 14:45:30 2016 +0300 ---------------------------------------------------------------------- .../internal/processors/query/GridQueryProcessor.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/78728db6/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java index b13c674..074e7e5 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java @@ -1948,6 +1948,9 @@ public class GridQueryProcessor extends GridProcessorAdapter { /** Flag indicating that we already tried to take a field. */ private volatile boolean fieldTaken; + /** Whether user was warned about missing property. */ + private volatile boolean warned; + /** * Constructor. * @@ -1987,8 +1990,12 @@ public class GridQueryProcessor extends GridProcessorAdapter { else if (val instanceof BinaryObject && ((BinaryObject)val).hasField(propName)) isKeyProp = isKeyProp0 = -1; else { - U.warn(log, "Neither key nor value have property " + - "[propName=" + propName + ", key=" + key + ", val=" + val + "]"); + if (!warned) { + U.warn(log, "Neither key nor value have property \"" + propName + "\" " + + "(is cache indexing configured correctly?)"); + + warned = true; + } return null; }
