Skip to content

Commit

Permalink
Changes for last reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
stavrospapadopoulos committed Apr 24, 2019
1 parent 9cfa98e commit 1c06178
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 13 deletions.
15 changes: 7 additions & 8 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# In progress
# In Progress

## New features

* Added support for multi-range reads (non-continuous range slicing) for sparse arrays.

## Improvements

* Better handling of `{C,CXX}FLAGS` during the build. [#1209](https://github.com/TileDB-Inc/TileDB/pull/1209)
* Removed fragment metadata caching.
* Removed array schema caching.
* If a subarray is set to an array before opening, only metadata of the fragments whose empty domain overlaps with that subarray are loaded upon array opening.
* The tile MBR in the in-memory fragment metadata are organized into an R-Tree, speeding up tile overlap operations during subarray reads.
* Added an advanced, tunable consolidation algorithm
* Small tiles are now batched for larger VFS read operations, improving read performance in some cases.

## Bug fixes

Expand All @@ -21,6 +20,10 @@

### C API

* Added functions `tiledb_subarray_partitoner_{next, get_current, done}`.
* Added object `tiledb_subarray_partitioner_t` and functions `tiledb_subarray_partitoner_{alloc, free, set_result_budget, set_result_budget_var, get_result_budget, get_result_budget_var}`.
* Added functions `tiledb_subarray_{get_est_result_size, get_est_result_size_var}`.
* Added object `tiledb_subarray_t` and functions `tiledb_subarray_{alloc, free, get_layout, get_type, get_ndim, get_domain, add_range, get_range_num, get_range}`.
* Added function `tiledb_query_get_layout`
* Added datatype `tiledb_buffer_t` and functions `tiledb_buffer_{alloc,free,get_type,set_type,get_size}`.

Expand Down Expand Up @@ -65,10 +68,6 @@ The 1.5.0 release focuses on stability, performance, and usability improvements,

### C API

* Added functions `tiledb_subarray_partitoner_{next, get_current, done}`.
* Added object `tiledb_subarray_partitioner_t` and functions `tiledb_subarray_partitoner_{alloc, free, set_result_budget, set_result_budget_var, get_result_budget, get_result_budget_var}`.
* Added functions `tiledb_subarray_{get_est_result_size, get_est_result_size_var}`.
* Added object `tiledb_subarray_t` and functions `tiledb_subarray_{alloc, free, get_layout, get_type, get_ndim, get_domain, add_range, get_range_num, get_range}`.
* Added function `tiledb_vfs_dir_size`.
* Added function `tiledb_vfs_ls`.
* Added config params `vfs.max_batch_read_size` and `vfs.max_batch_read_amplification`.
Expand Down
3 changes: 2 additions & 1 deletion test/src/unit-capi-sparse_array_2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2086,7 +2086,8 @@ void SparseArrayFx2::check_sparse_array_no_results(

// Prepare the buffers that will store the result
uint64_t buffer_size;
rc = tiledb_array_max_buffer_size(ctx_, array, "a1", subarray, &buffer_size);
uint64_t s[] = {1, 2, 1, 2};
rc = tiledb_array_max_buffer_size(ctx_, array, "a1", s, &buffer_size);
CHECK(rc == TILEDB_OK);

auto buffer = new int[buffer_size / sizeof(int)];
Expand Down
6 changes: 3 additions & 3 deletions tiledb/sm/c_api/tiledb.h
Original file line number Diff line number Diff line change
Expand Up @@ -3498,7 +3498,7 @@ TILEDB_EXPORT int32_t tiledb_subarray_get_range_num(
uint64_t* range_num);

/**
* Retrieves the number of ranges of the subarray along a given dimension.
* Retrieves a specific range of the subarray along a given dimension.
*
* **Example:**
*
Expand Down Expand Up @@ -3784,7 +3784,7 @@ TILEDB_EXPORT int32_t tiledb_subarray_partitioner_get_current(
TILEDB_EXPORT int32_t tiledb_subarray_partitioner_next(
tiledb_ctx_t* ctx,
const tiledb_subarray_partitioner_t* partitioner,
int* unsplittable);
int32_t* unsplittable);

/**
* Checks if the partitioner is done producing partitions.
Expand All @@ -3797,7 +3797,7 @@ TILEDB_EXPORT int32_t tiledb_subarray_partitioner_next(
TILEDB_EXPORT int32_t tiledb_subarray_partitioner_done(
tiledb_ctx_t* ctx,
const tiledb_subarray_partitioner_t* partitioner,
int* done);
int32_t* done);

/* ********************************* */
/* OBJECT MANAGEMENT */
Expand Down
3 changes: 3 additions & 0 deletions tiledb/sm/filesystem/vfs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,9 @@ Status VFS::read_all(
STATS_FUNC_IN(vfs_read_all);
STATS_COUNTER_ADD(vfs_read_all_total_regions, regions.size());

// Ensure no deadlock due to shared threadpool
assert(thread_pool != &thread_pool_);

if (regions.empty())
return Status::Ok();

Expand Down
2 changes: 2 additions & 0 deletions tiledb/sm/query/dense_cell_range_iter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ template <class T>
DenseCellRangeIter<T>::DenseCellRangeIter() {
domain_ = nullptr;
end_ = true;
tile_overlap_ = false;
}

template <class T>
Expand All @@ -64,6 +65,7 @@ DenseCellRangeIter<T>::DenseCellRangeIter(
, subarray_(subarray)
, layout_(layout) {
end_ = true;
tile_overlap_ = false;
}

/* ****************************** */
Expand Down
2 changes: 2 additions & 0 deletions tiledb/sm/subarray/subarray.cc
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,7 @@ Subarray Subarray::clone() const {
clone.tile_overlap_ = tile_overlap_;
clone.result_est_size_computed_ = result_est_size_computed_;
clone.tile_overlap_computed_ = tile_overlap_computed_;
clone.est_result_size_ = est_result_size_;

return clone;
}
Expand Down Expand Up @@ -895,6 +896,7 @@ void Subarray::swap(Subarray& subarray) {
std::swap(tile_overlap_, subarray.tile_overlap_);
std::swap(result_est_size_computed_, subarray.result_est_size_computed_);
std::swap(tile_overlap_computed_, subarray.tile_overlap_computed_);
std::swap(est_result_size_, subarray.est_result_size_);
}

// Explicit instantiations
Expand Down
4 changes: 3 additions & 1 deletion tiledb/sm/subarray/subarray.h
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,9 @@ class Subarray {

/**
* Returns the range coordinates (for all dimensions) given a flattened
* 1D range id.
* 1D range id. The range coordinates is a tuple with an index
* per dimension that uniquely identify a multi-dimensional
* subarray range.
*/
std::vector<uint64_t> get_range_coords(uint64_t range_idx) const;

Expand Down

0 comments on commit 1c06178

Please sign in to comment.