Skip to content

Tracking invalidations order is not consistent across commands #8206

@yossigo

Description

@yossigo

This is apparent when invalidation messages are sent on the same connection, as they may be received before or after the mutating command's reply.

For example, HSET delivers the reply first:

hget h f
_
hset h f 1
:1
>2
$10
invalidate
*1
$1
h

On the other hand, HDEL will deliver the invalidation first:

hget h f
$1
1
hdel h f
>2
$10
invalidate
*1
$1
h
:1

It seems the order of producing the reply, calling signalModifiedKey and creating a keyspace notification (which is also affected) is arbitrary. I'm not sure if the order makes a difference here but it should probably be consistent. @redis/core-team any thoughts?

Thanks @michael-grunder for bringing this up (and fixing hiredis to handle that)!

Metadata

Metadata

Assignees

Labels

state:help-wantedNo member is currently implementing this change

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions