Skip to content

fix(setnx): use set with nx instead setnx#3723

Merged
ndyakov merged 2 commits intomasterfrom
ndyakov/remove-deprecation-setnx
Mar 11, 2026
Merged

fix(setnx): use set with nx instead setnx#3723
ndyakov merged 2 commits intomasterfrom
ndyakov/remove-deprecation-setnx

Conversation

@ndyakov
Copy link
Member

@ndyakov ndyakov commented Feb 26, 2026

fixes #3715


Note

Medium Risk
Changes the wire command used by SetNX when expiration==0, which may affect compatibility with very old Redis servers and subtly alter behavior/metrics tied to command names.

Overview
Updates SetNX to always issue SET ... NX (including the zero-expiration case) instead of falling back to the legacy SETNX command.

Removes the deprecation note/compatibility comment that previously justified using SETNX for older Redis versions.

Written by Cursor Bugbot for commit 317a056. This will update automatically on new commits. Configure here.

@ndyakov ndyakov requested a review from ofekshenawa February 26, 2026 14:27
@ndyakov ndyakov added the bug label Feb 26, 2026
@jit-ci
Copy link

jit-ci bot commented Feb 26, 2026

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

@jit-ci
Copy link

jit-ci bot commented Feb 26, 2026

❌ Jit Scanner failed - Our team is investigating

Jit Scanner failed - Our team has been notified and is working to resolve the issue. Please contact support if you have any questions.


💡 Need to bypass this check? Comment @sera bypass to override.

@ndyakov ndyakov merged commit 8a4fed4 into master Mar 11, 2026
33 checks passed
@ndyakov ndyakov deleted the ndyakov/remove-deprecation-setnx branch March 11, 2026 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecation of SetNX causes inconvinienve (BoolCmd Vs StatusCmd)

2 participants