Skip to content

Commit ab6c52e

Browse files
Do not use read-ahead cache in array/group directory. (#5452)
[SC-62900](https://app.shortcut.com/tiledb-inc/story/62900) In all cases where we read files from the VFS there, we get the file's size beforehand and read the entirety of it. This makes the read-ahead cache not actually required. Fixes failures when reading empty `.vac` files (in S3 we do a `GetObject` with a range of `0-102399`, which fails with a range not satisfiable error). --- TYPE: BUG DESC: Fix failures when opening an array or group with an empty `.vac` file.
1 parent ff2cf06 commit ab6c52e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tiledb/sm/array/array_directory.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ ArrayDirectory::load_consolidated_commit_uris(
726726
std::string names;
727727
names.resize(size);
728728
RETURN_NOT_OK_TUPLE(
729-
resources_.get().vfs().read(uri, 0, &names[0], size),
729+
resources_.get().vfs().read(uri, 0, &names[0], size, false),
730730
nullopt,
731731
nullopt);
732732
std::stringstream ss(names);
@@ -752,7 +752,7 @@ ArrayDirectory::load_consolidated_commit_uris(
752752
auto& names = meta_files.back().second;
753753
names.resize(size);
754754
RETURN_NOT_OK_TUPLE(
755-
resources_.get().vfs().read(uri, 0, &names[0], size),
755+
resources_.get().vfs().read(uri, 0, &names[0], size, false),
756756
nullopt,
757757
nullopt);
758758
std::stringstream ss(names);
@@ -1082,7 +1082,7 @@ ArrayDirectory::compute_uris_to_vacuum(
10821082
throw_if_not_ok(vfs.file_size(vac_files[i], &size));
10831083
std::string names;
10841084
names.resize(size);
1085-
throw_if_not_ok(vfs.read(vac_files[i], 0, &names[0], size));
1085+
throw_if_not_ok(vfs.read(vac_files[i], 0, &names[0], size, false));
10861086
std::stringstream ss(names);
10871087
bool vacuum_vac_file = true;
10881088
for (std::string uri_str; std::getline(ss, uri_str);) {

tiledb/sm/group/group_directory.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ GroupDirectory::compute_uris_to_vacuum(const std::vector<URI>& uris) const {
273273
throw_if_not_ok(vfs_.file_size(vac_files[i], &size));
274274
std::string names;
275275
names.resize(size);
276-
throw_if_not_ok(vfs_.read(vac_files[i], 0, &names[0], size));
276+
throw_if_not_ok(vfs_.read(vac_files[i], 0, &names[0], size, false));
277277
std::stringstream ss(names);
278278
bool vacuum_vac_file = true;
279279
for (std::string uri_str; std::getline(ss, uri_str);) {

0 commit comments

Comments
 (0)