Skip to content

Bug: Subscriber client crash when listen to '__redis__:invalidate' messages queue.  #2117

@GT185076

Description

@GT185076

Found in :
https://github.com/StackExchange/StackExchange.Redis/issues/1461
Redis ver 6.2.6 (on docker's container)
Stackexchange ver : 2.2.79 / 2.5.61 ( on dotnet core 3.1 )

Lets say we have a subscriber for invalidate keys queue : (to implement near cache)

var subscriber = invalidator.GetSubscriber();
subscriber.Subscribe(" _ _ redis _ _ :invalidate").OnMessage(message =>
{
Console.WriteLine($"redis:invalidate: {message}");
});

We never get messages came from values changes or expired (we do get messages came from explicit publish call.)

When looking deeper we can see that the client id of the subscriber change after setting new values of tracking keys.. meaning it's was crash..

I got this : System.InvalidCastException: 'Cannot convert to RedisValue: MultiBulk' .
in this method :
Internal RedisValue AsRedisValue()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions