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

add snapshot while context , default configs updates #10

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

pratikmishra356
Copy link
Collaborator

@pratikmishra356 pratikmishra356 commented Apr 24, 2024

Problem

Record for config's history after every cac_config changes,
we also encountered problem regarding generating snowflake_id, we were not dropping the acquired mutex lock,
and when generating another snowflake_id , it gets stuck in deadlock kind of situation

Solution

Created config_versions table which will store the config's snapshot after every updates which affect the configs.
Fetch contexts and default_configs and insert into config_Versions table after any updates within the same transaction.
we are explicitly dropping acquired lock after snowflake_id generation
Also accepting tags parameters in every update request so that user can tag every versions

Environment variable changes

NA

Pre-deployment activity

Create db changes

Post-deployment activity

NA

API changes

get_config apis we will now provide priority inside context objects
adding optional tags field in every context, default_config and experiments updates
accepting version queryparam in every get_config apis

Possible Issues in the future

NA

@pratikmishra356 pratikmishra356 requested a review from a team as a code owner April 24, 2024 10:06
@pratikmishra356 pratikmishra356 force-pushed the snapshot-api-changes branch 10 times, most recently from b6410a5 to b7c93df Compare April 29, 2024 06:49
@Datron
Copy link
Collaborator

Datron commented Apr 30, 2024

Can we squash all commits into one?

@sauraww sauraww self-requested a review May 28, 2024 10:30
@pratikmishra356 pratikmishra356 force-pushed the snapshot-api-changes branch 7 times, most recently from 9eaebd2 to 779e975 Compare May 30, 2024 10:52
crates/service_utils/src/service/types.rs Show resolved Hide resolved
crates/service_utils/src/helpers.rs Outdated Show resolved Hide resolved
crates/service_utils/src/helpers.rs Outdated Show resolved Hide resolved
crates/service_utils/src/service/types.rs Outdated Show resolved Hide resolved
@pratikmishra356 pratikmishra356 force-pushed the snapshot-api-changes branch 2 times, most recently from 3b7cfa4 to 8e8ce3f Compare May 30, 2024 15:21
@pratikmishra356 pratikmishra356 force-pushed the snapshot-api-changes branch 2 times, most recently from c3a670c to f6b4cf2 Compare May 31, 2024 07:05
@pratikmishra356 pratikmishra356 force-pushed the snapshot-api-changes branch 4 times, most recently from 8277168 to a9b5343 Compare May 31, 2024 10:24
@Datron Datron merged commit 69588f6 into main Jun 3, 2024
4 checks passed
@Datron Datron deleted the snapshot-api-changes branch June 3, 2024 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority Things that need immediate attention
Projects
None yet
5 participants