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

Add constexpr for Filesystem support #4548

Merged
merged 7 commits into from
Dec 4, 2023
Merged

Add constexpr for Filesystem support #4548

merged 7 commits into from
Dec 4, 2023

Conversation

bekadavis9
Copy link
Contributor

@bekadavis9 bekadavis9 commented Nov 29, 2023

One step toward VFS and tiledb_unit cleanup. In vfs.h, add constexpr to represent whether or not a filesystem is supported. Additionally, do some miscellaneous, related cleanup.


TYPE: IMPROVEMENT
DESC: Use constexpr to check for filesystem support

Copy link

This pull request has been linked to Shortcut Story #37703: Define constexpr for filesystems in vfs.h.

Copy link
Contributor

@eric-hughes-tiledb eric-hughes-tiledb left a comment

Choose a reason for hiding this comment

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

There a behavioral regression removing what --vfs does on the test command line. We need to preserve this.

Everything else is name changes of one sort or another.

tiledb/sm/filesystem/vfs.h Outdated Show resolved Hide resolved
test/support/src/helpers.cc Show resolved Hide resolved
tiledb/sm/filesystem/vfs.cc Outdated Show resolved Hide resolved
tiledb/sm/filesystem/vfs.cc Outdated Show resolved Hide resolved
tiledb/sm/filesystem/vfs.cc Outdated Show resolved Hide resolved
Copy link
Contributor

@eric-hughes-tiledb eric-hughes-tiledb left a comment

Choose a reason for hiding this comment

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

Defect in get_supported_fs, plus some other cleanup there. Otherwise good.

test/support/src/helpers.cc Outdated Show resolved Hide resolved
test/support/src/helpers.cc Show resolved Hide resolved
test/support/src/helpers.cc Outdated Show resolved Hide resolved
test/support/src/helpers.cc Outdated Show resolved Hide resolved
test/support/src/helpers.cc Outdated Show resolved Hide resolved
Copy link
Contributor

@eric-hughes-tiledb eric-hughes-tiledb left a comment

Choose a reason for hiding this comment

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

LGTM

One stylistic nit about what kind of exception to throw; it's technically benign and does not constitute a behavior defect.

test/support/src/helpers.cc Outdated Show resolved Hide resolved
@KiterLuc KiterLuc merged commit 278c427 into dev Dec 4, 2023
61 checks passed
@KiterLuc KiterLuc deleted the rd/filesystem_constexpr branch December 4, 2023 20:16
ypatia pushed a commit that referenced this pull request Dec 6, 2023
One step toward `VFS` and `tiledb_unit` cleanup. In `vfs.h`, add
`constexpr` to represent whether or not a filesystem is supported.
Additionally, do some miscellaneous, related cleanup.

---
TYPE: IMPROVEMENT
DESC: Use constexpr to check for filesystem support
get_supported_fs(
&supports_s3, &supports_hdfs, &supports_azure, &supports_gcs);
if (supports_s3) {
if constexpr (tiledb::sm::filesystem::s3_enabled) {
Copy link
Member

Choose a reason for hiding this comment

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

This has caused the cloud VFSes to be initialized even when I pass --vfs native, if TileDB is compiled with the cloud VFSes enabled.

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.

4 participants