-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
feat(dbless) use LMDB as DB-less backend #8224
Conversation
48079be
to
4f63811
Compare
c1a1d8d
to
38068cf
Compare
c038130
to
2516980
Compare
a1e58fa
to
2516980
Compare
cb69028
to
8d79fbb
Compare
303af09
to
0c1187b
Compare
-- If it takes more than 60s it is very likely to be an internal error. | ||
-- However it will be reported as: "failed to broadcast reconfigure event: recursive". | ||
-- Let's paste the error message here in case someday we try to search it. | ||
-- Should we handle this case specially? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As somebody who has seen this specific error message on a production system, big big +1 to anything that we can do to make the error more meaningful and explanatory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not a 100% sure about the triggering condition of this, and I hesitate to make a change without understanding why the "recursive" error occurs. Will try to syncup with @suika-kong more offline on this error handling after it is merged (the current PR is getting hard to manage).
fe85dae
to
5dccba6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gojira PR also merged: Kong/gojira#43
This PR adds LMDB (Lightning Memory-Mapped Database) support for DB-less. At the same time, the shdict based DB-less storage backend has been retired and removed from the codebase. LMDB has better concurrency characters and is generally much more stable than shdict for storing config data. Because it can be natively accessed from different processes, we also removed the hack that sends the full DB-less config to the stream subsystem, which should improve the stability of DB-less reload at runtime as well. New config options `lmdb_environment_path` and `lmdb_map_size` has been added. Co-authored-by: Suika <xumin.zhou@konghq.com>
This PR adds LMDB (Lightning Memory-Mapped Database) support for
DB-less. At the same time, the shdict based DB-less storage backend has
been retired and removed from the codebase.
LMDB has better concurrency characters and is generally much more stable
than shdict for storing config data. Because it can be natively accessed
from different processes, we also removed the hack that sends the full
DB-less config to the stream subsystem, which should improve the
stability of DB-less reload at runtime as well.
New config options
lmdb_environment_path
andlmdb_map_size
has beenadded.
TODO: LMDB is fully capable of persisting the config between restarts, currently this is not enabled so it behaves like a in-memory storage (content is always wiped at startup). This will be enabled once we have more understanding of the impact.