Closed nombiezinja closed 6 years ago
Please, show complete code - something I can compile myself and run here. You might left out important bits that make your code fail. Also, please, show complete output of your program - error messages are important - do not ignore output bits - they might be important.
Also you should be calling rows.Err() after rows.Next() returns false, to see if the loop finished because of end of rows or because of some error. If there is an error there, it might be relevant to your problem.
Alex
Thank you for the quick reply. I have made a repo that reproduces the issue, the terminal output after compiling and running is in the README.md
https://github.com/nombiezinja/ignite-cursor-example
Thank you Ti
Thank you for providing sample program. Unfortunately I do not see anything that you are doing wrong. Perhaps you connection is not right, or your database is not configured properly. But I know nothing about Apache Ignite.
In your original message, you said:
The code works fine with another driver,
What driver is that? Why cannot you use it for your exercise?
Alex
Thank you for looking over the sample program, at least that helps me rule out any code issues. Perhaps it is my Ignite configuration and I shall look into it further.
The code works fine if I connect to a postgres database with lib/pq, but I'm looking to use distributed in-memory data storage.
Thank you very much for your help.
Thank you very much for your help.
Sorry I could not help. Feel free to ask here, if you think I can help.
Alex
For anyone who potentially finds their way here with the same problem before Ignite comes up with a fix
I have made a post to the Apache Ignite mailing list after our team replicated the error with the mgodbc package, on both linux and windows, and then with c#. It has been deemed a bug by the Ignite team and is now an open issue: https://issues.apache.org/jira/browse/IGNITE-8930
Thank you Alex.
SGTM. I am glad you found your problem.
I don't think there is anything else to do here, so closing this issue. Please, reopen if you think differently.
Alex
First of all thank you for writing the package, fantastic work!
I've been trying to interact with a local Apache Ignite cluster. I have been able to hit the database and perform different operations with success. However, consecutive queries result in the error
Too many open cursors
. The code works fine with another driver, I have made sure torows.Close()
after dealing with the query results.I have looked at your source code and saw that
Close()
callsSQLCloseCursor
, which is supported by the Apache Ignite ODBC interface: https://apacheignite-sql.readme.io/docs/specification. Unfortunately due to my limited knowledge of C, java, and general database layer things, my investigation ends there.Here is the code that, when run 128 times (the maximum amount of cursors I have set in my Ignite configuration) causes the
too many open cursors error
because each time it is run, it opens a cursor and never closes itDo you have any insight into this? Is the code somehow problematic, or is it a ODBC level issue? Thanks again for any suggestion you are able to offer