Skip to content

Conversation

Tishj
Copy link
Contributor

@Tishj Tishj commented Sep 10, 2024

  • BlockHandle::Load and BlockHandle::LoadFromBuffer are no longer static. As a result BlockHandle now inherits from enable_shared_from_this to enable shared_from_this() [1].
  • BufferManager::Allocate has lost the out parameter shared_ptr<BlockHandle> *block. Instead the BlockHandle is retrieved from the created BufferHandle with GetBlockHandle()

[1] This works because we always use make_shared_ptr when creating a BlockHandle, but perhaps we should formalize this and make the constructor private, creating a static method that returns a shared_ptr instead - so a BlockHandle can never be created without a shared_ptr backing it.

@Mytherin Mytherin merged commit 5fd2501 into duckdb:main Sep 11, 2024
39 checks passed
@Mytherin
Copy link
Collaborator

Thanks!

github-actions bot pushed a commit to duckdb/duckdb-r that referenced this pull request Sep 25, 2024
[Dev] Minor cleanup to BufferManager and BlockHandle API (duckdb/duckdb#13838)
[C-API Dev] Fix up `"Test DataChunk populate ListVector in C API"` test (duckdb/duckdb#13839)
github-actions bot added a commit to duckdb/duckdb-r that referenced this pull request Sep 25, 2024
[Dev] Minor cleanup to BufferManager and BlockHandle API (duckdb/duckdb#13838)
[C-API Dev] Fix up `"Test DataChunk populate ListVector in C API"` test (duckdb/duckdb#13839)

Co-authored-by: krlmlr <krlmlr@users.noreply.github.com>
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