From 8f35929b193e2d07bdadc7673eef2674b5e8a1be Mon Sep 17 00:00:00 2001 From: Trisha Anand Date: Fri, 6 Jun 2025 12:33:03 +0530 Subject: [PATCH] =?UTF-8?q?fix:=20Use=20non=20blocking=20SCAN=20command=20?= =?UTF-8?q?instead=20of=20blocking=20keys=20for=20redis=E2=80=A6=20(#40878?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … pattern match ## Description > [!TIP] > _Add a TL;DR when the description is longer than 500 words or extremely technical (helps the content, marketing, and DevRel team)._ > > _Please also include relevant motivation and context. List any dependencies that are required for this change. Add links to Notion, Figma or any other documents that might be relevant to the PR._ Fixes #`Issue Number` _or_ Fixes `Issue URL` > [!WARNING] > _If no issue exists, please create an issue first, and check with the maintainers if the issue is valid._ ## Automation /test all ### :mag: Cypress test results > [!CAUTION] > 🔴 🔴 🔴 Some tests have failed. > Workflow run: > Commit: f7391b7e5d00964ba4c3354b89ee55d9d80af430 > Cypress dashboard. > Tags: @tag.All > Spec: > The following are new failures, please fix them before merging the PR:
    >
  1. cypress/e2e/Regression/ClientSide/Git/GitSync/GitSyncedApps_spec.js
> List of identified flaky tests. >
Thu, 05 Jun 2025 16:17:10 UTC ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No ## Summary by CodeRabbit - **Refactor** - Improved the way session data is retrieved from Redis for better performance and scalability. No visible changes to user experience. --- .../appsmith/server/services/ce/SessionUserServiceCEImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/SessionUserServiceCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/SessionUserServiceCEImpl.java index 5a5d6babf4..b1c3b4996f 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/SessionUserServiceCEImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/SessionUserServiceCEImpl.java @@ -9,6 +9,7 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.data.redis.core.ReactiveRedisOperations; +import org.springframework.data.redis.core.ScanOptions; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.ReactiveSecurityContextHolder; @@ -105,7 +106,7 @@ public class SessionUserServiceCEImpl implements SessionUserServiceCE { */ public Flux> getSessionKeysWithUserSessions() { return redisOperations - .keys(SPRING_SESSION_PATTERN) + .scan(ScanOptions.scanOptions().match(SPRING_SESSION_PATTERN).build()) .flatMap(key -> Mono.zip( Mono.just(key), // The values are maps, containing various pieces of session related information.