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

creates new redis hash for replacements bypass projects #5832

Closed
wants to merge 1 commit into from

Conversation

xurui-c
Copy link
Member

@xurui-c xurui-c commented Apr 29, 2024

https://getsentry.atlassian.net/browse/SNS-2712

Currently, Redis does not support setting an expiration for individual keys in a hash. I want to set an expiration for replacements_bypass_projects without doing so to the entirety of the snuba-configs hash, so I'll move replacements_bypass_projects into its own individual hash.

Copy link

codecov bot commented Apr 29, 2024

Test Failures Detected: Due to failing tests, we cannot provide coverage reports at this time.

❌ Failed Test Results:

Completed 2128 tests with 1 failed, 2125 passed and 2 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
pytest

Test name:
tests.replacer.test_cluster_replacements::test_write_each_node[Replacements through storage nodes]

Envs:
- default
Traceback (most recent call last):
File ".../tests/replacer/test_cluster_replacements.py", line 213, in test_write_each_node
assert queries == expected_queries
AssertionError: assert {'query_node': ['SELECT count() FROM errors_dist FINAL WHERE event_id = '\n "'6f0ccc03-6efb-4f7c-8005-d0c992106b31'",\n 'INSERT INTO errors_dist (project_id, timestamp, event_id)\n'\n 'SELECT project_id, timestamp, event_id, group_id, '\n 'primary_hash\n'\n 'FROM errors_dist FINAL\n'\n "WHERE event_id = '6f0ccc03-6efb-4f7c-8005-d0c992106b31'\n"]} == {'query_node': ['SELECT count() FROM errors_dist FINAL WHERE event_id = '\n "'6f0ccc03-6efb-4f7c-8005-d0c992106b31'"],\n 'storage-0-0': ['INSERT INTO errors_local (project_id, timestamp, event_id)\n'\n 'SELECT project_id, timestamp, event_id, group_id, '\n 'primary_hash\n'\n 'FROM errors_local FINAL\n'\n "WHERE event_id = '6f0ccc03-6efb-4f7c-8005-d0c992106b31'\n"],\n 'storage-1-0': ['INSERT INTO errors_local (project_id, timestamp, event_id)\n'\n 'SELECT project_id, timestamp, event_id, group_id, '\n 'primary_hash\n'\n 'FROM errors_local FINAL\n'\n "WHERE event_id = '6f0ccc03-6efb-4f7c-8005-d0c992106b31'\n"],\n 'storage-2-0': ['INSERT INTO errors_local (project_id, timestamp, event_id)\n'\n 'SELECT project_id, timestamp, event_id, group_id, '\n 'primary_hash\n'\n 'FROM errors_local FINAL\n'\n "WHERE event_id = '6f0ccc03-6efb-4f7c-8005-d0c992106b31'\n"]}
Differing items:
{'query_node': ["SELECT count() FROM errors_dist FINAL WHERE event_id = '6f0ccc03-6efb-4f7c-8005-d0c992106b31'", "INSE... event_id, group_id, primary_hash\nFROM errors_dist FINAL\nWHERE event_id = '6f0ccc03-6efb-4f7c-8005-d0c992106b31'\n"]} != {'query_node': ["SELECT count() FROM errors_dist FINAL WHERE event_id = '6f0ccc03-6efb-4f7c-8005-d0c992106b31'"]}
Right contains 3 more items:
{'storage-0-0': ['INSERT INTO errors_local (project_id, timestamp, event_id)\n'
'SELECT project_id, timestamp, event_id, group_id, '
'primary_hash\n'
'FROM errors_local FINAL\n'
"WHERE event_id = '6f0ccc03-6efb-4f7c-8005-d0c992106b31'\n"],
'storage-1-0': ['INSERT INTO errors_local (project_id, timestamp, event_id)\n'
'SELECT project_id, timestamp, event_id, group_id, '
'primary_hash\n'
'FROM errors_local FINAL\n'
"WHERE event_id = '6f0ccc03-6efb-4f7c-8005-d0c992106b31'\n"],
'storage-2-0': ['INSERT INTO errors_local (project_id, timestamp, event_id)\n'
'SELECT project_id, timestamp, event_id, group_id, '
'primary_hash\n'
'FROM errors_local FINAL\n'
"WHERE event_id = '6f0ccc03-6efb-4f7c-8005-d0c992106b31'\n"]}
Full diff:
{
'query_node': ['SELECT count() FROM errors_dist FINAL WHERE event_id = '
- "'6f0ccc03-6efb-4f7c-8005-d0c992106b31'"],
& -
+ "'6f0ccc03-6efb-4f7c-8005-d0c992106b31'",
- 'storage-0-0': ['INSERT INTO errors_local (project_id, timestamp, event_id)\n'
+ 'INSERT INTO errors_dist (project_id, timestamp, event_id)\n'
- 'SELECT project_id, timestamp, event_id, group_id, '
& -
+ 'SELECT project_id, timestamp, event_id, group_id, '
- 'primary_hash\n'
& -
+ 'primary_hash\n'
- 'FROM errors_local FINAL\n'
& - ^^^^^
+ 'FROM errors_dist FINAL\n'
& ^^^^
- "WHERE event_id = '6f0ccc03-6efb-4f7c-8005-d0c992106b31'\n"],
& -
+ "WHERE event_id = '6f0ccc03-6efb-4f7c-8005-d0c992106b31'\n"],
- 'storage-1-0': ['INSERT INTO errors_local (project_id, timestamp, event_id)\n'
- 'SELECT project_id, timestamp, event_id, group_id, '
- 'primary_hash\n'
- 'FROM errors_local FINAL\n'
- "WHERE event_id = '6f0ccc03-6efb-4f7c-8005-d0c992106b31'\n"],
- 'storage-2-0': ['INSERT INTO errors_local (project_id, timestamp, event_id)\n'
- 'SELECT project_id, timestamp, event_id, group_id, '
- 'primary_hash\n'
- 'FROM errors_local FINAL\n'
- "WHERE event_id = '6f0ccc03-6efb-4f7c-8005-d0c992106b31'\n"],
}

@xurui-c xurui-c closed this May 9, 2024
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.

None yet

1 participant