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

Fix "too many open files" #23

Merged
merged 2 commits into from
May 30, 2024

Conversation

samansmink
Copy link
Collaborator

Kernel pointers were not properly freed.

Fixed by wrapping everything kernel in the UniqueKernelPointers. Refactored the utils a little in the process

@samansmink samansmink merged commit 4d64707 into duckdb:main May 30, 2024
13 checks passed
@samansmink samansmink deleted the fix-too-many-open-files branch May 30, 2024 12:09
@@ -57,16 +57,21 @@ struct DeltaSnapshot : public MultiFileList {
// TODO: How to guarantee we only call this after the filter pushdown?
void InitializeFiles();

template <class T>
T TryUnpackKernelResult(ffi::ExternResult<T> result) {
return KernelUtils::UnpackResult<T>(result, StringUtil::Format("While trying to read from delta table: '%s'", paths[0]));
Copy link

Choose a reason for hiding this comment

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

Might be better for UnpackResult to accept a lambda, to avoid allocating a string on the happy path of every kernel call?

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