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

Fix handling multiple records with flush cache set #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cgutman
Copy link
Contributor

@cgutman cgutman commented Jul 15, 2019

Currently, invalidation of superseded records is handled in Cache::addRecord() as each record is added to the cache. However, this breaks when there are multiple records of the same type in a single message with 'flush cache' set. In that case, the records that were just added in the same message get immediately superseded and only the final record of that type persists in the cache.

To fix this, use 2 passes to update the cache when we receive a message. First, invalidate any records that will be superseded by those contained within the message, then add all records from the message to the cache.

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