vertica / Vertica-Extension-Packages

User Defined Extensions (UDX) to the Vertica Analytic Database
http://www.vertica.com/
Other
119 stars 113 forks source link

[ODBCLoader] SQLDisconnect() failed with error code HY010 #66

Closed h-serizawa closed 2 years ago

h-serizawa commented 2 years ago

When I tried to copy the remote Vertica database, I hit the following error:

2022-03-09 11:06:46.758 Init Session:0x7f1c21ffb700-a0000000011823 <ERROR> @v_trial_node0001: VP001/3399: Failure in UDx RPC call InvokeDestroyUDL(): Error calling destroyUDL() in User Defined Object [ODBCLoader] at [ODBCLoader.cpp:250], error code: 0, message: ODBC Error: SQLDisconnect() failed with error code HY010, native code 0 [[unixODBC][Driver Manager]Function sequence error]
        LOCATION:  makeUDxRemoteProcedureCallHandlingErrors, /data/jenkins/workspace/RE-ReleaseBuilds/RE-Jackhammer/server/vertica/EE/EEUtil/UDxFenceSupport.cpp:574

The trace messages were as below:

[ODBC][116506][1646900363.989931][SQLDisconnect.c][208]
                Entry:
                        Connection = 0x7fc2e4008570
[ODBC][116506][1646900363.990464][SQLDisconnect.c][379]
                Exit:[SQL_ERROR]
                DIAG [25000] [Vertica][ODBC] (11120) Outstanding transactions during disconnect.

[ODBC][116506][1646900363.990571][SQLFreeHandle.c][290]
                Entry:
                        Handle Type = 2
                        Input Handle = 0x7fc2e4008570
[ODBC][116506][1646900363.990581][SQLFreeHandle.c][304]Error: HY010
[ODBC][116506][1646900363.990606][SQLFreeHandle.c][220]
                Entry:
                        Handle Type = 1
                        Input Handle = 0x7fc2e4007f70
[ODBC][116506][1646900363.990644][SQLFreeHandle.c][234]Error: HY010
[ODBC][116506][1646900363.990667][SQLGetDiagRec.c][677]
                Entry:
                        Connection = 0x7fc2e4008570
                        Rec Number = 1
                        SQLState = 0x7fc2f2c852a2
                        Native = 0x7fc2f2c8529c
                        Message Text = 0x7fc2f2c84e90
                        Buffer Length = 1024
                        Text Len Ptr = 0x7fc2f2c8529a
[ODBC][116506][1646900363.990692][SQLGetDiagRec.c][726]
                Exit:[SQL_SUCCESS]
                        SQLState = HY010
                        Native = 0x7fc2f2c8529c -> 0
                        Message Text = [[unixODBC][Driver Manager]Function sequence error]
h-serizawa commented 2 years ago

The cause is no commit/rollback is called before calling SQLDisconnect. I will work on it.

h-serizawa commented 2 years ago

The issue happens if auto-commit is disabled.

blackeyepanda commented 2 years ago

Hello could you please open the issue at https://github.com/vertica/ODBC-Loader. We are going to deprecate this repo and use a separate repo for ODBC-Loader, I am working on adding some tests and Continuous integration for that as well. Thanks

h-serizawa commented 2 years ago

@blackeyepanda Thank you for your update. I got it. I will try the same test to see if the issue still happens. BTW, can you add some notes in README regarding the deprecation? I'm also talking about another issue in issue #35. We will need to make sure all users use the source codes in the new repository.

h-serizawa commented 2 years ago

Close this issue since we are moving to new repository.