Skip to content

DiskManager keeps temporary files around until the manager itself is dropped #1679

@alamb

Description

@alamb

Describe the bug

The DiskManager passes out Strings rather than TempFiles. The tempfiles are eventually cleaned up, but only when the DiskManager is droped , rather than the actual temp file use us is complete.

This both leaves temporary files around longer than necessary, and would cause trouble with a long lived DiskManager across plans.

To Reproduce
Make a shared DiskManager and run queries that spill to disk. The files will not be cleaned up until the DiskManager is dropped

Expected behavior
When the temp file is no longer in use, it should be dropped

Additional context
Noticed while working on #1668

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions