Skip to content

Commit

Permalink
Unstatus the group clearing methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
teo-tsirpanis committed Sep 21, 2023
1 parent 36a7a34 commit 13a0168
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 14 deletions.
9 changes: 5 additions & 4 deletions tiledb/sm/group/group.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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());
Expand Down Expand Up @@ -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<GroupMember> group_member) {
Expand Down
4 changes: 1 addition & 3 deletions tiledb/sm/group/group.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 1 addition & 3 deletions tiledb/sm/group/group_details.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<GroupMember> group_member) {
Expand Down
4 changes: 1 addition & 3 deletions tiledb/sm/group/group_details.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tiledb/sm/serialization/group.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down

0 comments on commit 13a0168

Please sign in to comment.