-
Notifications
You must be signed in to change notification settings - Fork 51
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
sql: drop the attachdriver mechanism #97
Conversation
@pjbgf as agreed this is described in rancher/steve#269 |
After security assessment it was determined storing filterable/sortable columns on disk is acceptable, as none of the information is expected to be sensible. This removes the attachdriver mechanism that created one DB on the disk and another, optionally in memory, as attached DB. Only one DB is created now. This change was driven by the need of dropping the shared cache SQLite mode: https://sqlite.org/sharedcache.html which is in turn needed in order to activate WAL mode, which allows for better performance and less locking (including at CREATE INDEX time). Signed-off-by: Silvio Moioli <[email protected]>
Signed-off-by: Silvio Moioli <[email protected]>
Signed-off-by: Silvio Moioli <[email protected]>
Signed-off-by: Silvio Moioli <[email protected]>
ca518d1
to
9793898
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.
Minor nit, feel free to ignore. Otherwise, LGTM.
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.
Just needs to update the sql cache README but otherwise looks good 👍
Co-authored-by: Paulo Gomes <[email protected]>
Signed-off-by: Silvio Moioli <[email protected]>
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.
approving to allow merge since there's already the required number of reviewers.
This - sets PRAGMAs correctly, before they were ignored as they used a wrong syntax - removes the `shared=cache` option as #97 removed the need for it - removes the mechanism retrying on SQLITE_BUSY, which is then unnecessary - adds code to issue `BEGIN` on read-only transactions and `BEGIN IMMEDIATE` for transactions expected to write The last point is necessary in order to avoid `SQLITE_BUSY` (5) errors in presence of multiple concurrent writing transactions. Without it `busy_timeout` would not be sufficient, see discussion in #98 Signed-off-by: Silvio Moioli <[email protected]>
This includes various fixes to the UI Server-Side Pagination experimental feature: https://ranchermanager.docs.rancher.com/how-to-guides/advanced-user-guides/enable-experimental-features/ui-server-side-pagination - rancher/lasso#86 - rancher/lasso#90 - rancher/lasso#85 - rancher/lasso#92 - rancher/lasso#79 - rancher/lasso#97 - rancher/lasso#94 - rancher/lasso#98 - rancher/lasso#108 - rancher/lasso#99 It also includes improvements to code collecting metrics: - rancher/lasso#89 - rancher/lasso#95 And to test code: - rancher/lasso#100 - rancher/lasso#101 Signed-off-by: Silvio Moioli <[email protected]>
After security assessment it was determined storing filterable/sortable columns on disk is acceptable, as none of the information is expected to be sensible.
This removes the attachdriver mechanism that created one DB on the disk and another, optionally in memory, as attached DB. Only one DB is created now.
This change was driven by the need of dropping the shared cache SQLite mode:
https://sqlite.org/sharedcache.html
which is in turn needed in order to activate WAL mode, which allows for better performance and less locking (including at
CREATE INDEX
time).best reviewed commit-by-commit