-
Notifications
You must be signed in to change notification settings - Fork 134
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
Use eventual consistency to update EntityList num_entities #2651
Merged
Conversation
This file contains 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
kelvin-muchiri
force-pushed
the
el-num-entities-eventual
branch
2 times, most recently
from
July 30, 2024 10:18
888ad16
to
a8f3593
Compare
kelvin-muchiri
force-pushed
the
el-num-entities-eventual
branch
from
August 5, 2024 07:09
2f913aa
to
1ffcfcf
Compare
kelvin-muchiri
force-pushed
the
el-num-entities-eventual
branch
from
September 4, 2024 09:59
4a3a355
to
441f713
Compare
@kelvin-muchiri this is working as expected, the count in the Entity List is incremented correctly when multiple entities are submitted concurrently. The count also decrements correctly when entities are deleted from the Entity List |
kelvin-muchiri
force-pushed
the
el-num-entities-eventual
branch
from
September 9, 2024 12:16
45ba758
to
ff78942
Compare
previous implementation only locked cache between threads of the same processes. This change adds the ability to lock cache update between processes
ensure report exception is sent once in 24 hours instead of sending it every time the failover threshold is executed
suppress lint warning Function 'commit_cached_elist_num_entities_async' has no 'delay' member
kelvin-muchiri
force-pushed
the
el-num-entities-eventual
branch
from
September 13, 2024 06:53
ff78942
to
aa8bda6
Compare
ukanga
previously approved these changes
Sep 13, 2024
FrankApiyo
approved these changes
Sep 16, 2024
Merged
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.
Changes / Features implemented
Use eventual consistency to update
EntityList
num_entities
in the database. Store counter in the cache and add a task that should be run periodically to persist the counter in the database.Add a failover mechanism to persist cached data in the database incase the periodic task is not running or has malfunctioned.
Steps taken to verify this change does what is intended
Side effects of implementing this change
Less load on the database to update
num_entities
Before submitting this PR for review, please make sure you have:
Closes #