Enable removal of virtual filesystems #8772
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR enables the removal of installed virtual filesystems.
What are related issues/pull requests?
Not in GDAL, but over in DuckDB Spatial I've ran into multiple problems as a result of trying to integrate DuckDB's own filesystem abstractions into GDAL since we don't assume that there is a "global" filesystem. New filesystems can be attached or removed at runtime and are tied to the lifetime of a connection (of which there can be multiple simultaneously in different threads). My solution is to give every new connection its own filesystem handler with a random and unique prefix, which keeps connections from interfering with each other, but ideally I'd like to be able to remove the attached filesystem as well once a connection is closed. Hence, this patch.
Tasklist
Environment
Provide environment details, if relevant: