// Pipe to socket:
MULTI
SET foo 1
EXPIRE foo 30
EXEC
// Some php code that can take a few MS
// Pipe to socket:
MULTI
RPUSH bar 1
EXPIRE bar 30
EXPIRE foo 25
PUBLISH baz 1
EXEC
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/redis-db/a1c7a2b6-1b1d-4f6d-9b9e-6c2cc52ecda8%40googlegroups.com.
Itamar Haber ![]() |
Disclaimer
The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.
This email has been scanned for viruses and malware, and may have been automatically archived by Mimecast Ltd, an innovator in Software as a Service (SaaS) for business. Providing a safer and more useful place for your human generated data. Specializing in; Security, archiving and compliance. To find out more Click Here.
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/redis-db/b0c81f8e-2307-40e7-a91c-4a9c3d69c306%40googlegroups.com.
> very rarely, foo is not there after I get the baz event on Host B.It could have expired... Or maybe some other client had deleted it...
> If redis accepted and replied to a command, it actually blocked the entire process, ran those commands, waited for them to finish, sent a reply to the user, and continues with it's queue.Correct. Almost all commands are blocking until they are completed, and a small subset is asynchronous (e.g. BGSAVE and UNLINK). EXPIRE is also executed immediately in the sense that it sets the key's TTL. Actual expiration of the key is another matter and is handled by the server when needed.
On Fri, May 1, 2020 at 4:12 PM Vali Dr <val...@gmail.com> wrote:
Thank you, that's what I thought, but very rarely, foo is not there after I get the baz event on Host B.--One thing was not clear in your explanation tho:My code does:1) Pipe to socket some commands.2) Process some other stuff3) Pipe to the same socket other commands.So between 1 and 3, something else can run commands to redis no problem.Now to clarify 100% my previous question:- Can redis somehow run the commands 3) before 1) ?Theoretically, on a non blocking connection, there could be a network glitch, to delay the 1) commands, and then 3) commands could reach the redis server before 1).But I'm waiting for the response every time, so I know redis accepted 1) and then accepted 3).So I want to make 100% sure, that:- If redis accepted and replied to a command, it actually blocked the entire process, ran those commands, waited for them to finish, sent a reply to the user, and continues with it's queue.- And NOT, that it accepted the commands, confirmed the receipt with a reply, and then blocked the thread to run the commands. (like it does with expire)
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/redis-db/b0c81f8e-2307-40e7-a91c-4a9c3d69c306%40googlegroups.com.