We could even add a configuration switch to throw an exception in such case.

I guess that in majority of use cases there is a single type per cache,
and we should have a way to enforce that.

On Fri, Sep 22, 2017 at 7:47 PM, Mikhail Cherkasov <mcherka...@gridgain.com>
wrote:

> Hi all,
>
> I've seen several times that due wrong cache configuration people can't
> find
> data in cache and blame Ignite that it's buggy and doesn't work.
>
> And it's very difficult to find an error in the code, especially if you
> don't have reach experience with Ignite.
>
> One of the very common case is that user specifys a name to QueryEntity
> value type:
>     queryEntity.setValueType("MyCoolName")
> and later put data to cache like:
>     ignite.binary.toBinary(value)
>
> The example is simple and the error is obvious when you see this two lines
> close to each other, however, in real life, cache definition and data
> ingestion are separated by tons of code.
>
> We can save a lot of man-hours for our users if Ignite will print a warning
> If a cache has a configured QE and user puts BinaryObject with typeName
> which doesn't correspond to any QE.
>
> The warning should be printed only once, something like:
> [WARN] No table is found for %typeName% binary object.
>
> Thoughts?
>
>
> --
> Thanks,
> Mikhail.
>

Reply via email to