Skip to content

Commit

Permalink
Include sizes in error for global write size mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
ihnorton committed Apr 29, 2019
1 parent 14d849b commit 51284e4
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tiledb/sm/query/writer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1033,10 +1033,14 @@ Status Writer::finalize_global_write_state() {
if (cells_written != array_schema_->domain()->cell_num<T>((T*)subarray_)) {
storage_manager_->vfs()->remove_dir(meta->fragment_uri());
global_write_state_.reset(nullptr);
return LOG_STATUS(Status::WriterError(
"Failed to finalize global write state; Number "
"of cells written is different from the number of "
"cells expected for the query subarray"));
std::stringstream ss;
ss << "Failed to finalize global write state; Number "
<< "of cells written ("
<< cells_written
<< ") is different from the number of cells expected ("
<< array_schema_->domain()->cell_num<T>((T*)subarray_)
<< ") for the query subarray";
return LOG_STATUS(Status::WriterError(ss.str()));
}
}

Expand Down

0 comments on commit 51284e4

Please sign in to comment.