Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1650 RedisSinkCluster - Avoid recreating Counter #1658

Conversation

justinweng-instaclustr
Copy link
Collaborator

This PR registers and stores the Counter instance in RedisSinkCluster instead of recreating the instance every time the method send_error_response is called.

Closes #1650

@justinweng-instaclustr justinweng-instaclustr changed the title 1650 RedisSinkCluster - Avoid recreating Counter #1650 RedisSinkCluster - Avoid recreating Counter Jun 11, 2024
Copy link

codspeed-hq bot commented Jun 11, 2024

CodSpeed Performance Report

Merging #1658 will not alter performance

Comparing justinweng-instaclustr:1650-redissinkcluster-avoid-recreating-counter (c6688cd) with main (b129fae)

Summary

✅ 37 untouched benchmarks

@justinweng-instaclustr justinweng-instaclustr marked this pull request as ready for review June 11, 2024 06:29
Copy link
Member

@rukai rukai left a comment

Choose a reason for hiding this comment

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

nice!

for the next reviewer:
The test introduced in this PR doesnt actually test the functionality that we are changing.
It tests RedisSinkSingle while this PR changes RedisSinkCluster.
This test was written as a simpler version of the the test we wanted to write against RedisSinkCluster.
However it was later found that we cant test RedisSinkCluster as its implementation of the shotover_failed_requests_count metric is incorrect in that it does not match the behaviour of all other shotover transforms that emit this metric.
This behavior was from before this PR, and fixing it is out of scope of this simple cleanup PR.
Since we discovered this after writing the test for RedisSinkSingle, we've kept that test around, since it at least tests some functionality.

@justinweng-instaclustr justinweng-instaclustr merged commit 796e346 into shotover:main Jun 13, 2024
41 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.

RedisSinkCluster - Avoid recreating Counter
3 participants