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(core) properly cache plugin db miss #1914

Merged
merged 78 commits into from
Dec 28, 2016
Merged

fix(core) properly cache plugin db miss #1914

merged 78 commits into from
Dec 28, 2016

Conversation

Tieske
Copy link
Member

@Tieske Tieske commented Dec 21, 2016

Summary

In case multiple rows are returned for the lookup, but none matches, there would be no sentinel value for the db-miss inserted, causing excessive db access.

Note: build on top of the feature/upstreams2 branch as that already had a lot of changes in the hooks tests. So should be merged only after upstreams, hence tagged as pr/status/incomplete.

Full changelog

  • fix inserting a sentinel value always
  • added extra test to make sure that upon adding a sentinel value would be invalidated from the cache

Issues resolved

Fix #1841
Fix #1870

Tieske and others added 30 commits September 1, 2016 14:37
patch the global tcp.connect function to use the internal dns resolver
…rs an empty table if nothing is specified

instead of the previous `nil`. So if table length is 0, drop it and revert to defaults.
using postgres it won't start, complaining no options table was provided, yet the debug line shows it does.
using cassandra the tcp override debug lines don't show --> cassandra bypasses those overrrides. How??
@Tieske Tieske self-assigned this Dec 21, 2016
@Tieske Tieske added this to the 0.10 RC milestone Dec 21, 2016
@Tieske Tieske added the pr/changes requested Changes were requested to this PR by a maintainer. Please address them and ping back once done. label Dec 21, 2016
local plugin

before_each(function()
helpers.dao:truncate_tables()
Copy link
Member Author

Choose a reason for hiding this comment

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

@thibaultcha I had to insert the above truncation of the tables, or the tests would continue to give me an error that an entry already existed for hooks2.com below.

Did recently anything change here, as I was under the impression that the tables would automatically truncate upon starting/stopping kong in tests.

More odd; it only gave me the error hooks2.com, but not on hooks1.com.

any ideas?

@Tieske Tieske merged commit b36ffcb into next Dec 28, 2016
@Tieske Tieske deleted the fix/db-miss branch December 28, 2016 23:32
subnetmarco added a commit that referenced this pull request Jan 12, 2017
Tieske pushed a commit that referenced this pull request Jan 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/changes requested Changes were requested to this PR by a maintainer. Please address them and ping back once done.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants