Skip to content

NH-4015 - Update Npgsql driver and enable DTC for it #630

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 7, 2017

Conversation

fredericDelaporte
Copy link
Member

NH-4015 - Update Npgsql driver and enable DTC for it

I expect this to fail due to DTC not yet enabled on teamcity server side.

I have seen the link to open a rdp toward it, but I have not found a valid login for connecting and adjusting that.

@fredericDelaporte
Copy link
Member Author

fredericDelaporte commented May 25, 2017

Got DTC errors as expected, we need to enable it on TeamCity build agent, but I do not know the credentials for this.

Got some other tests errors due to a breaking change in Npgsql, rebased on #631 for solving them.

@fredericDelaporte
Copy link
Member Author

PostgreSql re-run had one DTC test failing, apparently due to previously done insert not already taken into account. It looks like it has the "latency" issues I am suspecting here.

Going to rebase on NH-4017 anyway.

@fredericDelaporte fredericDelaporte force-pushed the NH-4015 branch 3 times, most recently from c76f80d to f9da969 Compare May 28, 2017 11:32
MICROSOFT SOFTWARE LICENSE TERMS


MICROSOFT .NET LIBRARY
Copy link
Member Author

@fredericDelaporte fredericDelaporte May 28, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need that dependency for testing Npgsql v3. So I have put it there, but this causes NHibernate sources to "redistribute" it and so being subject to comply with that licence.

Maybe we should instead add the NuGet dependency in the test project, it would avoid having to "redistribute" that only for tests.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I vote for NuGet

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@@ -276,6 +276,9 @@ public void CanDeleteItemInDtc()
}
}

// Dodging "latency" due to db still haven't actually committed a distributed tx after scope disposal.
Thread.Sleep(100);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I intend to put a better "dodge" logic in #627. It will apply only to database drivers showcasing the "latency" trouble.

@fredericDelaporte
Copy link
Member Author

Any concern against merging this?

/// <summary>
/// Npgsql's DTC code seems to be somewhat broken as of 2.0.11.
/// </summary>
public override bool SupportsDistributedTransactions
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to check when DTC become available in Postgres.

Copy link
Member Author

@fredericDelaporte fredericDelaporte Jun 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But, it is available since long. Tests succeed. It was failing previously not because Postgres was not supporting it, but because we were not at all enlisting Postgres connection into scopes: enlist is false by default with npgsql. This PR switch it to true in the test connection string.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, sorry, I did not see that this is a dialect's test-double.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good then

Copy link
Member

@hazzik hazzik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hazzik
Copy link
Member

hazzik commented Jun 7, 2017

Merged

@hazzik hazzik merged commit 2adba0b into nhibernate:master Jun 7, 2017
@fredericDelaporte fredericDelaporte deleted the NH-4015 branch June 7, 2017 10:50
@fredericDelaporte fredericDelaporte added this to the 5.0.0 milestone Jun 7, 2017
@hazzik hazzik added the r: Fixed label Aug 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants