Skip to content

HINCRBY removes hash field TTL #6184

@daraber

Description

@daraber

Describe the bug
The HINCRBY command does not preserve the TTL property of a hash field. When an increment operation is performed on a field with an existing TTL, the TTL is removed.

To Reproduce
See code snippet below.

Expected behavior
The TTL of the hash field should remain unchanged after the HINCRBY operation.

Environment

  • OS: 6.6.87.2-microsoft-standard-WSL2
  • Kernel: Linux DESKTOP-3MCQMPO 6.6.87.2-microsoft-standard-WSL2 #1 SMP PREEMPT_DYNAMIC x86_64 x86_64 x86_64 GNU/Linux
  • Container: Docker
  • Dragonfly Version: 1.27.1 & 1.35.1 tested

Reproducible Code Snippet

HSETEX myhash 100 field1 0
> 1
FIELDTTL myhash field1
> 99
HINCRBY myhash field1 1
> 1
FIELDTTL myhash field1
> -1

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions