Skip to content

Conversation

jjmerchante
Copy link
Contributor

@jjmerchante jjmerchante commented Oct 7, 2025

Use a Redis pipeline to batch commands for adding events. This improves performance by reducing the number of round trips to the Redis server, especially when processing a large number of events.

This PR also fixes a bug. When pending entries existed in Redis but hadn't reached the minimum idle time, XAUTOCLAIM didn't return '0-0' as the next ID. Instead, it returned a different ID, causing the consumer to remain stuck until all recovered entries were processed, blocking new entries from being handled.

Fixes chaoss/grimoirelab#760

Use a Redis pipeline to batch commands for adding events.

This improves performance by reducing the number of
round trips to the Redis server, especially when
processing a large number of events.

Signed-off-by: Jose Javier Merchante <[email protected]>
When pending entries existed in Redis but hadn't reached
the minimum idle time, XAUTOCLAIM didn't return '0-0' as the
next ID. Instead, it returned a different ID, causing the
consumer to remain stuck until all recovered entries were
processed, blocking new entries from being handled.

Signed-off-by: Jose Javier Merchante <[email protected]>
Copy link
Member

@sduenas sduenas left a comment

Choose a reason for hiding this comment

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

LGTM

@sduenas sduenas merged commit 6cd6074 into chaoss:main Oct 7, 2025
9 checks passed
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 events in batches to Redis Stream

2 participants