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

Support specifying max DB size in rust #2963

Merged
merged 1 commit into from
Feb 28, 2024
Merged

Support specifying max DB size in rust #2963

merged 1 commit into from
Feb 28, 2024

Conversation

benjaminwinger
Copy link
Collaborator

#2956 for the Rust API

Copy link

codecov bot commented Feb 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.53%. Comparing base (4283428) to head (253fc13).
Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2963   +/-   ##
=======================================
  Coverage   93.53%   93.53%           
=======================================
  Files        1122     1117    -5     
  Lines       42963    42925   -38     
=======================================
- Hits        40184    40149   -35     
+ Misses       2779     2776    -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -46,6 +50,8 @@ impl Default for SystemConfig {
max_num_threads: 0,
enable_compression: true,
read_only: false,
// This is a little weird, but it's a temporary interface
max_db_size: u32::MAX as u64,
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not initialize max_db_size in a similar way to buffer_pool_size?

Copy link
Collaborator Author

@benjaminwinger benjaminwinger Feb 28, 2024

Choose a reason for hiding this comment

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

I was trying to match the default argument for the constructor, but it guess the rust API isn't using the C++ SystemConfig constructor anyway (it probably should, but I think it was written when the constructor was different).

-1u I guess is fine for the maxDBSize since it's not a power of two, but on the other hand, I think bufferPoolSize should default to zero instead since -1u is a valid value that just gets turned into auto-detection.

@mewim mewim merged commit e09b3ec into master Feb 28, 2024
15 checks passed
@mewim mewim deleted the rust-max-db-size branch February 28, 2024 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants