On Sun, Feb 5, 2012 at 6:21 PM, huang jun <[email protected]> wrote:
> hi, all
> Recently, we use s3 client cyberduck to add some files to RADOS, it
> seems doesn't support objects named with prefix of '_'.
> eg, if we put a object named "_test"(1 prefix "_") in bucket TEST, it
> will store in RADOS in another name "___test"(3 prefix "_").
> but if we list bucket TEST, it sends op whoes oid is "__test"(2
> prefix "_"), result the RADOS return ENOENT err.
That's a bug. From what I can tell, the bucket listing is broken (when
object name starts with underscore). I created bug #2025 in the ceph
tracker.
> we trace the debug log,and found where it comes from:
> in "translate_raw_obj" func of rgw_common.h,
> if (obj.size() >= 2 && obj[1] == '_') {
> obj = obj.substr(1);
> return true;
> }
> why cut the obj name?
The underscore serves as an escape character. Some object are created
in a separate namespace, and the format for those objects is:
_<namespace>_<obj name>
These objects reside in the bucket, but may not be listable, and may
not be accounted in the bucket stats.
> what is "string ns" in struct rgw_obj doing here? Can't we just use
> the origin obj name that passed object_name verfication?
'ns' is the namespace. I'm not sure what check you're pointing at, but
we do need to handle the case where an object has a namespace
different than the default one.
Thanks,
Yehuda
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html