-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
SQLite: Allow configurable sqlite database pragma variables. #5135
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #5135 +/- ##
=======================================
Coverage 76.2% 76.2%
=======================================
Files 760 760
Lines 61550 61568 +18
Branches 8125 8123 -2
=======================================
+ Hits 46881 46905 +24
+ Misses 14669 14663 -6
|
hey, I've been testing this PR and I can't make page_size work. It always sets it to 4096 with brand new transaction.db file. Does it work for you? UPD: I think I've found the problem after debugging it for some time. Looks like the following code has an issue:
Changing the ordering of commonPragma and pragma helps to set the correct page_size. I'm not entirely sure this is correct solution though UPD2: I understand this issue is not directly linked to your PR so I can take over the fix in this/other branch if you don't want to bother |
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 mentioned in previous comment, this change doesn't actually work. I've debugged the main problem and here're some nitpicks mostly
Thank you for looking into it. You're welcome to take over. |
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've tested the last change and looks good to me. Ideally I would prefer the tests to check those <512 and >65536 and not power of 2 values but it's good to go anyways
Agree tests are a must before this is merged. I'll write them today. |
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 two more minor changes in the configuration documentation section, this aside this is good.
The page_size will soon be made configurable with #5135, making this re-ordering necessary. When opening SQLite connection, there are specific pragmas set with commonPragmas. In particular, PRAGMA journal_mode creates journal file and locks the page_size; as of this commit, this sets the page size to the default value of 4096. Coincidentally, the hardcoded page_size was also 4096, so no issue was noticed.
@dangell7 can you please merge into your branch from |
@dangell7 thank you for merging current |
@Bronek yes thank you! LGTM |
High Level Overview of Change
Context of Change
Type of Change
.gitignore
, formatting, dropping support for older tooling)API Impact
libxrpl
change (any change that may affectlibxrpl
or dependents oflibxrpl
)