Skip to content

Implement GCRA rate limiting#4475

Open
a-TODO-rov wants to merge 6 commits intomasterfrom
gcra
Open

Implement GCRA rate limiting#4475
a-TODO-rov wants to merge 6 commits intomasterfrom
gcra

Conversation

@a-TODO-rov
Copy link
Copy Markdown
Contributor

@a-TODO-rov a-TODO-rov commented Mar 25, 2026

resolves #4474


Note

Medium Risk
Adds a new Redis command surface (GCRA) across Jedis, UnifiedJedis, and pipelining plus new request/response types, which could affect command routing/serialization and API compatibility. CI/test matrix is also expanded to Redis 8.8, potentially surfacing version-specific behavior changes.

Overview
Adds first-class support for Redis GCRA rate limiting, including new GCRAParams for argument building (with optional NUM_REQUESTS) and GCRAResponse parsing, and wires the command through Protocol, CommandObjects, Jedis, UnifiedJedis, and pipeline interfaces.

Extends integration/unit coverage with new GCRA tests (string + binary, unified + jedis) and updates the test environment to include Redis 8.8 (workflow matrix, Makefile supported versions, and new .env.v8.8). Also simplifies RediSearch drop-index assertions to use assertThrows.

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

@jit-ci
Copy link
Copy Markdown

jit-ci bot commented Mar 25, 2026

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 25, 2026

Test Results

   309 files  + 1     309 suites  +1   11m 58s ⏱️ -7s
11 203 tests +67  11 102 ✅ +22  101 💤 +45  0 ❌ ±0 
 5 888 runs  +37   5 864 ✅ +22   24 💤 +15  0 ❌ ±0 

Results for commit d3fed3b. ± Comparison against base commit 6d3ac4e.

♻️ This comment has been updated with latest results.

@a-TODO-rov a-TODO-rov marked this pull request as ready for review March 25, 2026 17:35
@a-TODO-rov a-TODO-rov requested a review from ggivo March 25, 2026 17:35
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

return null;
}

List<Long> list = (List<Long>) data;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Response builder uses fragile List cast

Low Severity

The GCRA_RESPONSE_BUILDER casts data to List<Long>, which is unique among all response builders in this package — others consistently use List<Object> and convert elements individually. Due to type erasure, this unchecked cast always succeeds at runtime, but individual element access will throw ClassCastException if any value is a non-Long type (e.g., a Double returned under RESP3). Since retryAfter and fullBurstAfter represent fractional seconds and period is a double, this is a plausible concern.

Fix in Cursor Fix in Web

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add GCRA Rate Limiting Command Support for Redis OSS 8.8

1 participant