Skip to content

Commit

Permalink
Merge pull request ceph#43915 from qiuxinyidian/dev-rgw
Browse files Browse the repository at this point in the history
rgw: when radosgw-admin stating user, add user exists judging

Reviewed-by: Casey Bodley <[email protected]>
Reviewed-by: Daniel Gryniewicz <[email protected]>
  • Loading branch information
dang authored Dec 8, 2021
2 parents 0e8ec96 + c1c4da3 commit 4cdf6d4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/rgw/services/svc_user_rados.cc
Original file line number Diff line number Diff line change
Expand Up @@ -910,9 +910,17 @@ int RGWSI_User_RADOS::read_stats(const DoutPrefixProvider *dpp,
{
string user_str = user.to_str();

RGWUserInfo info;
real_time mtime;
int ret = read_user_info(ctx, user, &info, nullptr, &mtime, nullptr, nullptr, null_yield, dpp);
if (ret < 0)
{
return ret;
}

cls_user_header header;
int r = cls_user_get_header(dpp, rgw_user(user_str), &header, y);
if (r < 0)
if (r < 0 && r != -ENOENT)
return r;

const cls_user_stats& hs = header.stats;
Expand Down

0 comments on commit 4cdf6d4

Please sign in to comment.