Is it possible to configure Apache Ignite QueryCursor to be autocloseable in the xml configuration file?

classic Classic list List threaded Threaded
9 messages Options
tizh tizh
Reply | Threaded
Open this post in threaded view
|

Is it possible to configure Apache Ignite QueryCursor to be autocloseable in the xml configuration file?

I am writing a program in Golang that connects to local Ignite clusters
through an ODBC driver package written in Go.

During development I began getting this error repeatedly:



I have looked into the source code of the golang ODBC driver I used, which
calls `SQLCloseCursor` promptly when my code calls the function `Close()`. I
have looked at the ODBC conformance specifications of Ignite and noted that
`SQLCloseCursor` is supported, yet somehow cursors are left open after
queries.

I have since attempted to configure the setting for QueryCursor to value
`autocloseable` in the xml file I use for Ignite Configuration when
initiating a cluster. I have used this doc as reference, but I am limited by
my lack of knowledge of Java -
https://ignite.apache.org/releases/latest/javadoc/index.html. After some
attempts I am not sure whether my syntax is wrong, or this is simply not a
configurable property through the xml configuration file, and that the only
way to tell Ignite to close the cursor is in the code, after queries. Any
insight is appreciated!

Lastly,  here <https://github.com/nombiezinja/ignite-cursor-example>   is a
repository with the chunk of code causing the issue taken out and redacted
to provide further perspective for anyone who may be able to help

Cheers and thank you



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

Re: Is it possible to configure Apache Ignite QueryCursor to be autocloseable in the xml configuration file?

What is Ignite version you are on?
Best Regards,
Igor


On Sat, Jun 30, 2018 at 9:28 PM tizh <[hidden email]> wrote:
I am writing a program in Golang that connects to local Ignite clusters
through an ODBC driver package written in Go.

During development I began getting this error repeatedly:



I have looked into the source code of the golang ODBC driver I used, which
calls `SQLCloseCursor` promptly when my code calls the function `Close()`. I
have looked at the ODBC conformance specifications of Ignite and noted that
`SQLCloseCursor` is supported, yet somehow cursors are left open after
queries.

I have since attempted to configure the setting for QueryCursor to value
`autocloseable` in the xml file I use for Ignite Configuration when
initiating a cluster. I have used this doc as reference, but I am limited by
my lack of knowledge of Java -
https://ignite.apache.org/releases/latest/javadoc/index.html. After some
attempts I am not sure whether my syntax is wrong, or this is simply not a
configurable property through the xml configuration file, and that the only
way to tell Ignite to close the cursor is in the code, after queries. Any
insight is appreciated!

Lastly,  here <https://github.com/nombiezinja/ignite-cursor-example>   is a
repository with the chunk of code causing the issue taken out and redacted
to provide further perspective for anyone who may be able to help

Cheers and thank you



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

Re: Is it possible to configure Apache Ignite QueryCursor to be autocloseable in the xml configuration file?

Hi Igor,
I am using version 2.5.0. Thanks
Ti



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

Re: Is it possible to configure Apache Ignite QueryCursor to be autocloseable in the xml configuration file?

Are you on Linux or Windows?

Can you try nightly build [1] to check if the issue persist?


Best Regards,
Igor


On Mon, Jul 2, 2018 at 8:02 PM tizh <[hidden email]> wrote:
Hi Igor,
I am using version 2.5.0. Thanks
Ti



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

Re: Is it possible to configure Apache Ignite QueryCursor to be autocloseable in the xml configuration file?

Hi Igor,

Thank you very much for the response. I have installed
apache-ignite-fabric-2.6.0.20180703-bin.zip and started a cluster  from the
list of nightly build here:

https://ci.ignite.apache.org/viewLog.html?buildId=lastSuccessful&buildTypeId=Releases_NightlyRelease_RunApacheIgniteNightlyRelease&tab=artifacts&guest=1

Then I ran my program again and got the same error:


Thanks again,
Best regards,
Ti



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

Re: Is it possible to configure Apache Ignite QueryCursor to be autocloseable in the xml configuration file?

Understood. I can not see the error text, though. Can you
insert it as a plain text?

Best Regards,
Igor


On Tue, Jul 3, 2018 at 8:28 PM tizh <[hidden email]> wrote:
Hi Igor,

Thank you very much for the response. I have installed
apache-ignite-fabric-2.6.0.20180703-bin.zip and started a cluster  from the
list of nightly build here:

https://ci.ignite.apache.org/viewLog.html?buildId=lastSuccessful&buildTypeId=Releases_NightlyRelease_RunApacheIgniteNightlyRelease&tab=artifacts&guest=1

Then I ran my program again and got the same error:


Thanks again,
Best regards,
Ti



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

Re: Is it possible to configure Apache Ignite QueryCursor to be autocloseable in the xml configuration file?

Hi Igor,

Here is the error I have been getting repeatedly:

2018/06/29 20:46:06 SQLExecute: {HY000} Too many open cursors (either close
other open cursors or increase the limit through
ClientConnectorConfiguration.maxOpenCursorsPerConnection) [maximum=128,
current=128]

So far we have been able to replicate the error with the same code on both
Linux and Windows. We have also written a small C# program and made calls
through ODBC, and got the same error.

Thank you

Best regards,
Ti



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

Re: Is it possible to configure Apache Ignite QueryCursor to be autocloseable in the xml configuration file?

It seems like a bug. I've filed a ticket for it: [1]. I'll try to have
a look at it soon.

By the way, have you tried Go client for Ignite [2]?

On Wed, Jul 4, 2018 at 7:33 PM tizh <[hidden email]> wrote:
Hi Igor,

Here is the error I have been getting repeatedly:

2018/06/29 20:46:06 SQLExecute: {HY000} Too many open cursors (either close
other open cursors or increase the limit through
ClientConnectorConfiguration.maxOpenCursorsPerConnection) [maximum=128,
current=128]

So far we have been able to replicate the error with the same code on both
Linux and Windows. We have also written a small C# program and made calls
through ODBC, and got the same error.

Thank you

Best regards,
Ti



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

Re: Is it possible to configure Apache Ignite QueryCursor to be autocloseable in the xml configuration file?

Yes, we decided to look into the go client. Thank you very much for your
help.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/