StackExchange / StackExchange/StackExchange.Redis

Conditions for numeric comparisons (counters)

Open
#2,962 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
6.2k
Forks
1.6k
Avg merge
1d 15h
Merged PRs (30d)
43

Description

Looking at the supported kinds of Condition for use with transactions, I was surprised there is not a way to compare two Redis values numerically (greater than, less than, etc.). The Redis "string" type is often used to represent numeric counters (as indicated by the INCR/DECR commands).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the supported kinds of Condition for transactions and Redis's INCR/DECR counter semantics. Define what numeric greater-than and less-than comparisons should cover, then verify that the resulting transaction conditions behave correctly for Redis string values representing counters.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, redis
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.