Ignite Queue (Documentation or Code defect)?

classic Classic list List threaded Threaded
6 messages Options
Humphrey Humphrey
Reply | Threaded
Open this post in threaded view
|

Ignite Queue (Documentation or Code defect)?

When creating an ignite queue without an CollectionConfiguration (null) I'm
not getting the expected Queue or Exception as documented in the JavaDoc.
But i'm getting a cache that is null.



The documentation:




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Humphrey Humphrey
Reply | Threaded
Open this post in threaded view
|

Re: Ignite Queue (Documentation or Code defect)?

Great I see something went missing:

Ignite ignite = Ignition.start();
IgniteQueue queue = ignite.queue("Queue", 0, null);
ignite.close();

In the queue created above I expect it to throw an exception if the queue
can not be fetched, instead it is giving me a queue that is "null".

Check the JavaDoc:
Will get a named queue from cache and create one if it has not been created
yet and cfg is not null. If queue is present already, queue properties will
not be changed. Use collocation for CacheMode.PARTITIONED caches if you have
lots of relatively small queues as it will make fetching, querying, and
iteration a lot faster. If you have few very large queues, then you should
consider turning off collocation as they simply may not fit in a single
node's memory.

Params:
name – Name of queue.
cap – Capacity of queue, 0 for unbounded queue. Ignored if cfg is null.
cfg – Queue configuration if new queue should be created.

Returns:
Queue with given properties.

Throws:
org.apache.ignite.IgniteException – If queue could not be fetched or
created.






--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Humphrey Humphrey
Reply | Threaded
Open this post in threaded view
|

Re: Ignite Queue (Documentation or Code defect)?

Hope someone pics this up. That the code is not behaving as the documentation
is saying.
(Not throwing exception when queue can not be fetched).



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
stephendarlington stephendarlington
Reply | Threaded
Open this post in threaded view
|

Re: Ignite Queue (Documentation or Code defect)?

It’s a good catch, but I think this is one of the developer mailing list.

I see the same behaviour. Arguably it’s consistent with the Ignite#cache() which returns null if the cache doesn’t exist.

Regards,
Stephen

> On 18 Aug 2020, at 15:29, Humphrey <[hidden email]> wrote:
>
> Hope someone pics this up. That the code is not behaving as the documentation
> is saying.
> (Not throwing exception when queue can not be fetched).
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/


dmagda dmagda
Reply | Threaded
Open this post in threaded view
|

Re: Ignite Queue (Documentation or Code defect)?

In reply to this post by Humphrey
Could you please file a ticket in Ignite JIRA for 2.10 release? That's definitely an overlook in the current implementation.

-
Denis


On Tue, Aug 18, 2020 at 9:57 AM Humphrey <[hidden email]> wrote:
Hope someone pics this up. That the code is not behaving as the documentation
is saying.
(Not throwing exception when queue can not be fetched).



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Vladimir Pligin Vladimir Pligin
Reply | Threaded
Open this post in threaded view
|

Re: Ignite Queue (Documentation or Code defect)?