Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rgw:bucket check remove _multipart_ prefix #6501

Merged
merged 1 commit into from Oct 4, 2016

Conversation

dwj192
Copy link
Contributor

@dwj192 dwj192 commented Nov 9, 2015

Fixes: 13724

Signed-off-by: Weijun Duan duanweijun@h3c.com

Fixes: 13724

Signed-off-by: Weijun Duan <duanweijun@h3c.com>
@dwj192
Copy link
Contributor Author

dwj192 commented Nov 9, 2015

root@compiler:/home/dwj/git/ceph/src# ./radosgw-admin bucket check --bucket=key-bkt
[
"_multipart_TODO",
"_multipart_vstart.sh"
]

my modify:
root@compiler:/home/dwj/git/ceph/src# ./radosgw-admin bucket check --bucket=key-bkt
[
"TODO",
"vstart.sh"
]

@dwj192
Copy link
Contributor Author

dwj192 commented Nov 19, 2015

@yehudasa

  1. I can't understand why there add multipart to every obj, even the obj is not multipart obj
  2. there will generate a obj named objname.meta in what situation?
  3. In the function check_bad_index_multipart
    string name = oid.substr(0, pos);
        string suffix = oid.substr(pos + 1);

        if (suffix.compare("meta") == 0) {
          meta_objs[name] = true;
        } else {
          all_objs[key] = name;
        }

then

for (aiter = all_objs.begin(); aiter != all_objs.end(); ++aiter) {
    string& name = aiter->second;

    if (meta_objs.find(name) == meta_objs.end()) {
      objs_to_unlink.push_back(aiter->first);
    }
  }

according to the code,the logic is :
a. when my obj name is: myfile, then there must had a obj named: _multipart_myfile.meta, the obj _multipart_myfile will not unlink;
b.when my obj name is: myfile1.txt. then there must had a obj named: _multipart_myfile1.meta, the obj _multipart_myfile1.txt will not unlink;
what it means?

thanks yehudasa!

@yehudasa
Copy link
Member

yehudasa commented Dec 1, 2015

@dwj192 maybe we shouldn't display these entries at all? It's incorrect to just remove the namespace.

@liewegas
Copy link
Member

@dwj192 ping

@mattbenjamin
Copy link
Contributor

@dwj192 hi weijun, could you acknowledge? yehudasa is suggesting just not projecting the inapplicable objects; do you concur? if so, would you amend the change?

(@oritwas)

@yehudasa yehudasa merged commit a8fe555 into ceph:master Oct 4, 2016
@yehudasa
Copy link
Member

yehudasa commented Oct 4, 2016

@dwj192 sorry for the late turn around, took me a while to understand what this bug is actually about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants