nhibernate-core icon indicating copy to clipboard operation
nhibernate-core copied to clipboard

Added support for the CancelQuery() method in IStatelessSession

Open SoftStoneDevelop opened this issue 3 years ago • 20 comments

Resolve #809

SoftStoneDevelop avatar Jun 16 '22 16:06 SoftStoneDevelop

On GitHub action, AFAIK we are running SQL Server under Linux, and we seem to hit dotnet/SqlClient#109. It has been fixed in Microsoft.Data.SqlClient 2.0, but we are using System.Data.SqlClient, which is unlikely to be fixed, since Microsoft has announced it will go on developing only Microsoft.Data.SqlClient.

Should we switch Sql Server tests to Microsoft.Data.SqlClient? Well, ideally I think we should go on testing System.Data.SqlClient under .Net Framework, but test Microsoft.Data.SqlClient under net6.0.

fredericDelaporte avatar Jun 26 '22 20:06 fredericDelaporte

@hazzik, it seems this cancel test freezes Oracle test suit. (Maybe Oracle does not support Cancel...) The NHibernate agent on TeamCity seems gone. Can you check what is going on please?

fredericDelaporte avatar Jun 28 '22 19:06 fredericDelaporte

@fredericDelaporte

The NHibernate agent on TeamCity seems gone. Can you check what is going on please?

My Credit Card in Azure is expired and MS has shut down the environment. That is why.

hazzik avatar Jun 28 '22 23:06 hazzik

Should we switch Sql Server tests to Microsoft.Data.SqlClient?

We should at least add it to the test suit. Maybe we test it in both platforms?

hazzik avatar Jun 28 '22 23:06 hazzik

My Credit Card in Azure is expired and MS has shut down the environment. That is why.

Ok, I've re-enabled my Azure subscription. The agent is back online, but now it is not authorized :(

hazzik avatar Jul 11 '22 22:07 hazzik

The agent is back online, but now it is not authorized :(

It seems all you have to do is to click Authorize on this page https://teamcity.jetbrains.com/agents.html?tab=unauthorizedAgents (I see no such button but I might not have all required permissions)

bahusoid avatar Jul 13 '22 06:07 bahusoid

I don’t have the button either. Need to contact Jetbrains people.

On Wed, 13 Jul 2022 at 6:33 PM, Roman Artiukhin @.***> wrote:

The agent is back online, but now it is not authorized :(

It seems all you have to do is to click Authorize on this page https://teamcity.jetbrains.com/agents.html?tab=unauthorizedAgents ( I see no such button but I might not have all required rights)

— Reply to this email directly, view it on GitHub https://github.com/nhibernate/nhibernate-core/pull/3074#issuecomment-1182822100, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABDLF6GGIW47ZY33YUKUPLVTZPMVANCNFSM5Y7MFYPA . You are receiving this because you were mentioned.Message ID: @.***>

hazzik avatar Jul 13 '22 07:07 hazzik

Maybe it needs to be moved to NHibernate pool first? Do you have permissions for this?

bahusoid avatar Jul 13 '22 14:07 bahusoid

I've raised a ticket to solve it. I don't have permission to change pool nor authorize agents. Hopefully it will be resolved soon. Sorry for the delays - I don't have good access to a workstation.

hazzik avatar Jul 20 '22 05:07 hazzik

Ok, agent is back. I've also increased tier for the VM, so builds are slightly faster now.

hazzik avatar Jul 20 '22 23:07 hazzik

For some reason I cannot get any logs for Oracle

hazzik avatar Jul 21 '22 02:07 hazzik

Oracle on TC works fine :-/

hazzik avatar Jul 21 '22 03:07 hazzik

@hazzik I checked locally on Oracle 19c: test passed. Perhaps the problem is that on TC Oracle 18c. In release 18c, "Manual completion of unmanaged queries" was added (https://docs.oracle.com/en/database/oracle/oracle-database/18/newft/new-features.html#GUID-EFC832BE-DC2C-4997-8C38-8A9E27A4FFC4). But from what version 18.x?

I'll try installing 18.3 on my machine and run the test: if it passes then I have no idea why TC failed.

SoftStoneDevelop avatar Aug 02 '22 19:08 SoftStoneDevelop

On 18.3 (on my local server) it works fine, all tests passed. The only difference from TC is that I have Oracle on Windows.

SoftStoneDevelop avatar Aug 03 '22 06:08 SoftStoneDevelop

On 18.3 (on my local server) it works fine, all tests passed. The only difference from TC is that I have Oracle on Windows.

"Canceled in 360m - Oracle" misled me, I checked locally for nothing. At the TC: all test(NHibernate Oracle Managed 32) pass.

SoftStoneDevelop avatar Aug 06 '22 05:08 SoftStoneDevelop

"Canceled in 360m - Oracle" misled me

Why misled? There is clearly some issue with Git Hub Action build (Oracle on Linux) - https://github.com/nhibernate/nhibernate-core/runs/7643016174?check_suite_focus=true

bahusoid avatar Aug 11 '22 16:08 bahusoid

On "Git Hub Action" yes but not on teamcity(I initially thought that the assembly hung on the TC due to deadlock). So "misled me" means that the problem is not where I thought it was.

SoftStoneDevelop avatar Aug 11 '22 17:08 SoftStoneDevelop

But I wrote that:

Oracle on TC works fine :-/

hazzik avatar Aug 11 '22 21:08 hazzik

Yes, yes I am blind, sometimes.

SoftStoneDevelop avatar Aug 12 '22 01:08 SoftStoneDevelop

I think we should simply skip tests for Oracle and Sql Server on linux.

bahusoid avatar Aug 16 '22 08:08 bahusoid

It makes for a central point for checking database limitations, which may help when we wish to check if some of these limitations do no more apply. Tests skipped directly inside them for some databases are harder to spot.

fredericDelaporte avatar Sep 26 '22 21:09 fredericDelaporte

I think the problem is that the implementation relies on the batcher implementation. And SqlServer and Oracle use custom batcher implementation that might behave differently.

hazzik avatar Sep 26 '22 22:09 hazzik

Created issue to track SqlServer and Oracle #3167

hazzik avatar Sep 26 '22 23:09 hazzik