Skip to content

Share one local and one remote DataFolder instance throughout the server #416

Description

@CGodiksen

Currently, the established pattern used throughout the server, for example in the ConfigurationManager, DataTransfer, CompressedDataManager, UncompressedDataManager, and DataOptimizer components, is that we clone local_data_folder and remote_data_folder and pass the cloned instances to the various components.

Instead DataFolder should own a single copy of its fields and then the entire DataFolder struct should be shared instead using an Arc. The result should be that there is a single local DataFolder instance and a single remote DataFolder instance. The same logic should be applied to handle the way we currently clone either the local or remote DataFolder for the query_data_folder, if possible.

Before this change is implemented, we should make sure that this does not cause any issues with either correctness or performance. The DataFolder fields are mostly static but the dynamic cache and dynamic session context could cause issues. We should also double check if this is an issue elsewhere in the server or in other crates.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestrefactorReduce or simplify existing code

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions