Skip to content

Conversation

jkub
Copy link
Contributor

@jkub jkub commented Oct 23, 2022

This change enables a storage engine to vary the block size.

Along the way:

  • It also addresses one issue where the block size was being set improperly (in column_data_allocator.cpp)
  • Updates comment in FileBuffer.hpp and changes parameter names to make intended usage clearer (and avoid bugs like the one above)
  • Makes tests less sensitive to block size. (generally any test that invokes pragma_database_size())
    • There's probably a better way to do this, but this is what worked for me.

//
// make room for the block header (if this is not the db file header)
//
// qq: Why is the second condition (new_size != Storage::FILE_HEADER_SIZE) necessary?
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is likely a special case for the file header (the first 4KB of the file) - we could likely work around it elsewhere if the special case is removed as well.

@Mytherin Mytherin merged commit 596c5fe into duckdb:master Oct 25, 2022
@Mytherin
Copy link
Collaborator

Thanks!

hawkfish added a commit to hawkfish/duckdb that referenced this pull request Jun 5, 2025
* Just do signed compares to see if this fixes the Win32 test failure
Mytherin added a commit that referenced this pull request Jun 6, 2025
* Just do signed compares to fix Win32 test failure
github-actions bot pushed a commit to duckdb/duckdb-r that referenced this pull request Jun 6, 2025
github-actions bot added a commit to duckdb/duckdb-r that referenced this pull request Jun 6, 2025
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.

2 participants