Skip to content

fix: redis float bug (MAPCO-10747)#17

Merged
Powfu2 merged 4 commits into
masterfrom
fix/fix-redis-float
Jun 3, 2026
Merged

fix: redis float bug (MAPCO-10747)#17
Powfu2 merged 4 commits into
masterfrom
fix/fix-redis-float

Conversation

@Powfu2

@Powfu2 Powfu2 commented Jun 3, 2026

Copy link
Copy Markdown
Contributor
Question Answer
Bug fix
New feature
Breaking change
Deprecations
Documentation
Tests added
Chore

Related issues: #XXX , #XXX ...
Closes #XXX ...

Further information:
change the condition of the ttl recognition,
the subscribe was create infinty loop because hes the listener and the writer,
this change would make him listen just to new rows and not just those he add them ttl:

@Powfu2 Powfu2 requested a review from NivGreenstein June 3, 2026 08:02
@Powfu2 Powfu2 added the bug Something isn't working label Jun 3, 2026
Comment thread src/redis/subscribe.ts
const prefixWithTtl = redisPrefix !== undefined ? `${redisPrefix}:${TTL_PREFIX}` : TTL_PREFIX;
await subscriber.subscribe(`__keyevent@0__:set`, async (message) => {
if (!message.startsWith(prefixWithTtl)) {
const isTtlKey = message.startsWith(TTL_PREFIX) || message.includes(`:${TTL_PREFIX}`);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why?
if TTL prefix is set it should always be ttl:<uuid>

@NivGreenstein

Copy link
Copy Markdown
Contributor

fix eslint

@Powfu2 Powfu2 changed the title fix: redis float bug fix: redis float bug (MAPCO-10747) Jun 3, 2026
@Powfu2 Powfu2 merged commit 0a33202 into master Jun 3, 2026
7 checks passed
@Powfu2 Powfu2 deleted the fix/fix-redis-float branch June 3, 2026 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants