diff --git a/tiledb/sm/group/group.cc b/tiledb/sm/group/group.cc index 3f0b0ecedad..7d14739aad6 100644 --- a/tiledb/sm/group/group.cc +++ b/tiledb/sm/group/group.cc @@ -267,7 +267,8 @@ Status Group::close() { metadata_.clear(); metadata_loaded_ = false; is_open_ = false; - return clear(); + clear(); + return Status::Ok(); } bool Group::is_open() const { @@ -339,7 +340,7 @@ void Group::delete_group(const URI& uri, bool recursive) { } // Clear metadata and other pending changes to avoid patching a deleted group. metadata_.clear(); - throw_if_not_ok(group_details_->clear()); + group_details_->clear(); // Close the deleted group throw_if_not_ok(this->close()); @@ -537,8 +538,8 @@ void Group::set_config(Config config) { config_.inherit(config); } -Status Group::clear() { - return group_details_->clear(); +void Group::clear() { + group_details_->clear(); } void Group::add_member(const shared_ptr group_member) { diff --git a/tiledb/sm/group/group.h b/tiledb/sm/group/group.h index 0a7b58496a0..59503b5afc9 100644 --- a/tiledb/sm/group/group.h +++ b/tiledb/sm/group/group.h @@ -89,10 +89,8 @@ class Group { /** * Clear a group - * - * @return */ - Status clear(); + void clear(); /** * Deletes data from and closes a group opened in MODIFY_EXCLUSIVE mode. diff --git a/tiledb/sm/group/group_details.cc b/tiledb/sm/group/group_details.cc index 9ea10a69e9d..1c9f3e3a6ec 100644 --- a/tiledb/sm/group/group_details.cc +++ b/tiledb/sm/group/group_details.cc @@ -57,13 +57,11 @@ GroupDetails::GroupDetails(const URI& group_uri, uint32_t version) , changes_applied_(false) { } -Status GroupDetails::clear() { +void GroupDetails::clear() { members_by_uri_.clear(); members_by_name_.clear(); members_vec_.clear(); members_to_modify_.clear(); - - return Status::Ok(); } void GroupDetails::add_member(const shared_ptr group_member) { diff --git a/tiledb/sm/group/group_details.h b/tiledb/sm/group/group_details.h index 94784db33e8..16a3b2c5ae2 100644 --- a/tiledb/sm/group/group_details.h +++ b/tiledb/sm/group/group_details.h @@ -58,10 +58,8 @@ class GroupDetails { /** * Clear a group - * - * @return */ - Status clear(); + void clear(); /** * Add a member to a group, this will be flushed to disk on close diff --git a/tiledb/sm/serialization/group.cc b/tiledb/sm/serialization/group.cc index 06d978ef11d..93c5f191fe5 100644 --- a/tiledb/sm/serialization/group.cc +++ b/tiledb/sm/serialization/group.cc @@ -212,7 +212,7 @@ Status group_from_capnp( } if (group_reader.hasGroup()) { - throw_if_not_ok(group->clear()); + group->clear(); RETURN_NOT_OK(group_details_from_capnp(group_reader.getGroup(), group)); }