[cards] Changing card get API route to ensure faster retrieval.#442
Open
valayDave wants to merge 2 commits intoNetflix:masterfrom
Open
[cards] Changing card get API route to ensure faster retrieval.#442valayDave wants to merge 2 commits intoNetflix:masterfrom
valayDave wants to merge 2 commits intoNetflix:masterfrom
Conversation
- deadlocks happened when cleanups coincided with heavy load
- tests simulating a cleanup (disk + shared-objects) and heavy load together were successfully able to reproduce the deadlock situation
- Locking at the `context` level:
- Each time we want to clean up we lock to create a new context
- All directories/processes are written within that new context.
- Switching this context which ensure that all new processes get created differently and the cleanup process can safely remove everything.
- Context also sets the read/write directory for the cache object used in the API endpoint.
- All locking on the API side now always time-bound. The code time's out if it can't acquire a lock.
- The method ensure that all operations won't in-definately hold the lock.
- Changed defaults for minimum amount to time to wait for cards in the cache process to 20 seconds (helps make things snappier)
- Added `timings` dict in card cache to optimize loading cycles (Ensured that it is set based on a per-card basis)
- this change will ensure ds-root is available via metadata so that cards can be directly accessed from the API endpoint . - We extract ds-root from the metadata table to retrieve cards. - shedding dead code in light of new changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.