-
Notifications
You must be signed in to change notification settings - Fork 166
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
.NET 7 support #104
Comments
I haven't tried using it with .NET 7, but it should work (and if it doesn't for some reason then I'd like to fix it) |
So I've just run the unit tests locally targeting Are you able to provide a repro for this failure, or enable the RedLock logging and supply those? |
Hi
Thanks for responding.
I am not sure how to configure and get log information from RedLock.
If you point us in the right direction I will do so.
Thanks
…On Fri, Oct 6, 2023 at 12:13 PM Sam Cook ***@***.***> wrote:
So I've just run the unit tests locally targeting net7.0 and they all
passed.
Are you able to provide a repro for this failure, or enable the RedLock
logging and supply those?
—
Reply to this email directly, view it on GitHub
<#104 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACA6J2ONIFI7Y3M7BX5DRY3X57RV7AVCNFSM6AAAAAA5UMMG4SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJQGQZTKOBYGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Hi |
Hi, to enable logging you need to pass an instance of |
Hi
Have you any examples or any docs that shows this?
Thanks
…On Sun, Oct 8, 2023 at 11:32 PM Sam Cook ***@***.***> wrote:
Hi, to enable logging you need to pass an instance of ILoggerFactory as a
parameter when you create your RedLockFactory
—
Reply to this email directly, view it on GitHub
<#104 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACA6J2ILD3KECI7MF3LF7NDX6MSXLAVCNFSM6AAAAAA5UMMG4SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJSGE3TSMJYGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Nothing specifically documented, but you can see it in the tests (e.g. https://github.com/samcook/RedLock.net/blob/master/RedLockNet.Tests/RedLockTests.cs#L119). You just need to get hold of an instance of |
Thanks Sam. We'll give it a try and see if we can see anything that stops
the lock in .NET7
…On Mon, Oct 16, 2023 at 1:37 PM Sam Cook ***@***.***> wrote:
Nothing specifically documented, but you can see it in the tests (e.g.
https://github.com/samcook/RedLock.net/blob/master/RedLockNet.Tests/RedLockTests.cs#L119
).
You just need to get hold of an instance of ILoggerFactory (e.g. from
your DI container) and pass it to RedLockFactory.Create(endpoints,
loggerFactory).
—
Reply to this email directly, view it on GitHub
<#104 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACA6J2IHDNSL4EBMQMLGIGLX7UTAPAVCNFSM6AAAAAA5UMMG4SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRUGM4DGMRUHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Not related to .NET 7 but the lib fails at aquiring locks if Creating the RedLockFactory by:
where connection is a
When |
Hi Sam,
This is the log of Failing to get a lock with .7 AND .Net8. But works on
.NET6.
It keeps throwing this until the lock expires.
Any ideas.?
Thanks.
info: RedLockNet.SERedis.RedLock[0]
Lock status: NoQuorum (Acquired: 0, Conflicted: 0, Error: 1),
Demo:IE:HORboys-tU6U-dfDbic1lw (1de99336-c109-4be1-a10c-e92dc5d325d1)
info: RedLockNet.SERedis.RedLock[0]
Lock status: NoQuorum (Acquired: 0, Conflicted: 0, Error: 1),
Demo:IE:HORboys-tU6U-dfDbic1lw (0473cedf-f4fd-4053-8a31-9598c82ea070)
info: RedLockNet.SERedis.RedLock[0]
Lock status: NoQuorum (Acquired: 0, Conflicted: 0, Error: 1),
Demo:IE:HORboys-tU6U-dfDbic1lw (4432bb6f-a531-468a-9134-1b506550855d)
…On Mon, Oct 16, 2023 at 2:08 PM H Nahavandi ***@***.***> wrote:
Thanks Sam. We'll give it a try and see if we can see anything that stops
the lock in .NET7
On Mon, Oct 16, 2023 at 1:37 PM Sam Cook ***@***.***> wrote:
> Nothing specifically documented, but you can see it in the tests (e.g.
> https://github.com/samcook/RedLock.net/blob/master/RedLockNet.Tests/RedLockTests.cs#L119
> ).
>
> You just need to get hold of an instance of ILoggerFactory (e.g. from
> your DI container) and pass it to RedLockFactory.Create(endpoints,
> loggerFactory).
>
> —
> Reply to this email directly, view it on GitHub
> <#104 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ACA6J2IHDNSL4EBMQMLGIGLX7UTAPAVCNFSM6AAAAAA5UMMG4SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRUGM4DGMRUHA>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
Would appreciate if you could let us know if this can be fixed or not so that we can adjust our application appropriately. |
@hn1 Are you able to set the logging level to Also what version of RedLock.net and StackExchange.Redis are you using? And what OS/platform are you running on? What redis version or service are you running against? Does increasing the I have so far been unable to reproduce this issue with a console application targeting both |
@jonnepmyra I'm also unable to reproduce this, if you're able to provide a repro example could you open a new issue about it? |
RedLock works perfectly on .NET6 - It is only after upgrading to .NET7 or .NET 8 that we have these issues. So the version numbers and OS should not be an issue as otherwise it would also not work on .NET6 which it does without any issues. We are using the RedLock version 2.3.2We are also using the Microsoft.Extensions.Caching.StackExchangeRedis version 8.0.0 (for .NET 8)We are running on windows. This is the Debug log: info: RedLockNet.SERedis.RedLock[0] |
Thanks @hn1. According to log message you posted, StackExchange.Redis is not able to connect to redis on I updated my test application to use StackExchange.Redis 2.6.112 and it's still working just fine for me. 🤔 Are you able to make a sample project that reproduces the issue for you, which I'm able to run to try and see what the problem is? |
That does not make sense as we are using the redis cache for all sorts of
things without any issue in .NET6, .NET and .NET8.
That is definitely not it.
We have tried RedLock-cs and that works fine. So we will be using that for
now.
Thanks
…On Wed, Dec 6, 2023 at 9:35 PM Sam Cook ***@***.***> wrote:
Thanks @hn1 <https://github.com/hn1>.
According to log message you posted, StackExchange.Redis is not able to
connect to redis on localhost:6379 (which is why it's failing to acquire
a lock). I'm assuming you have a redis server running there, if it works
under .NET 6.0.
I updated my test application to use StackExchange.Redis 2.6.112 and it's
still working just fine for me. 🤔
Are you able to make a sample project that reproduces the issue for you,
which I'm able to run to try and see what the problem is?
—
Reply to this email directly, view it on GitHub
<#104 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACA6J2IOBLPQQTMHT7R3VHTYIDQJXAVCNFSM6AAAAAA5UMMG4SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBTG4ZDOMJSGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
That's unfortunate, if there is a problem with RedLock I'd like to figure out what it is, but without being able to reproduce it I'm not really able to get any further. In your example you supplied the debug logs for, is your redis server running on |
Yes it is. But Stackexchange is using the redis server all the time and
its nothing to do with that. So it must be RedLock.
…On Thu, Dec 7, 2023 at 1:11 AM Sam Cook ***@***.***> wrote:
That's unfortunate, if there is a problem with RedLock I'd like to figure
out what it is, but without being able to reproduce it I'm not really able
to get any further.
In your example you supplied the debug logs for, is your redis server
running on localhost:6379?
—
Reply to this email directly, view it on GitHub
<#104 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACA6J2I5WSKNQ76YXGMBJHDYIEJVDAVCNFSM6AAAAAA5UMMG4SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBTHE3TCMRVGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
How are you initialising the Can you show the configuration you're passing to |
I'm using RedLock in .Net 5, .Net 6, .Net7 and .Net8 without problem. I have not have any problem with different versions of SE.Redis either in any of the dotnet version and combinations. What I have seen is in other communications is that resolution of hostname Will you have the same problem if you using the IP address insted of hostname? |
WOW. WELL DONE.
It works.
Thank you so much for your help.
…On Thu, Dec 7, 2023 at 6:37 AM Patric Forsgard ***@***.***> wrote:
I'm using RedLock in .Net 5, .Net 6, .Net7 and .Net8 without problem. I
have not have any problem with different versions of SE.Redis either in any
of the dotnet version and combinations.
What I have seen is in other communications is that resolution of hostname
localhost some times is resolved to the IP4 address and sometimes to the
IP6 address and to get around that the usage of IP directly has solved the
problem.
Will you have the same problem if you using the IP address insted of
hostname?
—
Reply to this email directly, view it on GitHub
<#104 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACA6J2JP5RY33U2CO26PMPDYIFPZJAVCNFSM6AAAAAA5UMMG4SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBUG42TANBVGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
This is how we are initializing it:
services.AddSingleton<IDistributedLockFactory, RedLockFactory>(
x => RedLockFactory.Create(
new List<RedLockNet.SERedis.Configuration.RedLockEndPoint>
{
new RedLockNet.SERedis.Configuration.RedLockEndPoint
{
EndPoint = new System.Net.DnsEndPoint("127.0.0.1", 6379),
Password = ""
}
}
));
Does this help?
…On Thu, Dec 7, 2023 at 7:02 AM Sam Cook ***@***.***> wrote:
Interesting, thanks for the suggestion @Tasteful
<https://github.com/Tasteful>.
@hn1 <https://github.com/hn1> out of interest, we're you using your own
instances of ConnectionMultiplexer with RedLock.net, or were you letting it
establish its own connection?
—
Reply to this email directly, view it on GitHub
<#104 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACA6J2J5VGT6HBAOBYKQ3NTYIFSZPAVCNFSM6AAAAAA5UMMG4SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBUG44DIMZSG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
When we upgrade from .NET6 to .NET7, RedLock fails to obtain locks.
Is .NET7 supported?
Thanks
The text was updated successfully, but these errors were encountered: