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

More Robust Error Handling For Cache Issues #249

Merged
merged 3 commits into from
Oct 14, 2021

Conversation

dave-tucker
Copy link
Collaborator

  1. Put Updates Received from RPC calls in to a buffered channel. This ensures that we process updates after we've processed the initial cache contents
  2. Ensure the cache cannot panic
  3. When we get errors that would cause cache inconsistencies, trigger a reconnect so the cache is purged and rebuilt when the monitor is established.

This ensures that updates that appear while waiting for the initial
cache state from ovsdb-server are placed in a buffered channel. We then
process these events during cache.Run() in FIFO order.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
This ensures that populate and populate2 return any errors instead of
panicking.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
This ensures that we rebuild the cache

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
@coveralls
Copy link

Pull Request Test Coverage Report for Build 1342590425

  • 46 of 82 (56.1%) changed or added relevant lines in 3 files are covered.
  • 14 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.003%) to 72.904%

Changes Missing Coverage Covered Lines Changed/Added Lines %
client/client.go 10 19 52.63%
cache/cache.go 35 62 56.45%
Files with Coverage Reduction New Missed Lines %
cache/cache.go 14 69.84%
Totals Coverage Status
Change from base Build 1341703883: 0.003%
Covered Lines: 4052
Relevant Lines: 5558

💛 - Coveralls

Copy link
Contributor

@flavio-fernandes flavio-fernandes left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link
Contributor

@trozet trozet left a comment

Choose a reason for hiding this comment

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

/lgtm

@dave-tucker dave-tucker merged commit 52b0298 into ovn-org:main Oct 14, 2021
@dave-tucker dave-tucker deleted the update-channels branch October 14, 2021 20:22
@dave-tucker dave-tucker added the fix label Nov 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants