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

Create Redis bulk store utils #13197

Merged
merged 16 commits into from Mar 6, 2024
Merged

Create Redis bulk store utils #13197

merged 16 commits into from Mar 6, 2024

Conversation

adrinr
Copy link
Collaborator

@adrinr adrinr commented Mar 5, 2024

Description

Adding a new util into our redis implementation to allow bulk stores. We use redis pipelines to perform this action atomically on the redis server

Addresses

Launchcontrol

Adding redis.bulkStore function

@adrinr adrinr requested a review from a team as a code owner March 5, 2024 16:10
@adrinr adrinr requested review from mike12345567 and removed request for a team March 5, 2024 16:10
Copy link

linear bot commented Mar 5, 2024

@adrinr adrinr requested a review from samwho March 5, 2024 16:11
@adrinr adrinr mentioned this pull request Mar 5, 2024
@adrinr adrinr marked this pull request as draft March 5, 2024 17:02
@adrinr adrinr marked this pull request as ready for review March 5, 2024 17:11
@adrinr adrinr enabled auto-merge March 6, 2024 09:59
@adrinr adrinr requested a review from samwho March 6, 2024 11:22
`
const keys = Object.keys(dataToStore)
const values = Object.values(dataToStore)
const pipeline = client.pipeline()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Pipelines aren't guaranteed to be atomic. I don't believe that is important for this code, the worse that can happen is the expiry is overwritten with a slightly different time, but just wanted to point it out in case you can think of a reason it would matter.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Pipelines are meant to be leaner, I think they should be fine for this use case

@adrinr adrinr merged commit c19a852 into master Mar 6, 2024
12 checks passed
@adrinr adrinr deleted the BUDI-8046/redis-bulk-store branch March 6, 2024 11:31
@github-actions github-actions bot locked and limited conversation to collaborators Mar 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants