Large PEXPIRE closes the connection without a reply · Issue #2245 · microsoft/garnet · GitHub
Skip to content

Large PEXPIRE closes the connection without a reply #2245

Closed

Description

@quiet-maple-47

Describe the bug

A large PEXPIRE on a missing key closes the connection without a reply. The server stays up and a new connection can PING.

Steps to reproduce the bug

Run this Python 3 script against a local test instance at port 6379 (standard library only):

import socket, uuid
args = [b"PEXPIRE", uuid.uuid4().hex.encode(), b"300000000000000"]
request = b"*3\r\n" + b"".join(b"$%d\r\n%s\r\n" % (len(a), a) for a in args)
with socket.create_connection(("127.0.0.1", 6379), timeout=3) as client:
    client.settimeout(3)
    client.sendall(request)
    print(repr(client.recv(64)))

Actual: an empty byte string (EOF).

Expected behavior

Redis returns an integer reply of 0. A normal error would also be fine if the expiry is outside Garnet's supported range.

Screenshots

No response

Release version

Garnet main at 44cf0bd (reports 2.2.1)

IDE

No response

OS version

Linux arm64

Additional context

EXPIRE with 300000000000 has the same result. Related: #2094 fixed the GETEX path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

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