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/bbe9983b Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/bbe9983b Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/bbe9983b Branch: refs/heads/ignite-2801 Commit: bbe9983b2ca7da969f7f3d2008c2a04f698ab223 Parents: 21fae4e Author: vozerov-gridgain <[email protected]> Authored: Fri Feb 26 14:45:30 2016 +0300 Committer: vozerov-gridgain <[email protected]> Committed: Mon Feb 29 12:52:39 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/bbe9983b/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 64bbc8f..93adc05 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; }
