Re: rados import/export

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 30, 2012 at 14:08, Sage Weil <sage@xxxxxxxxxxxx> wrote:
>> Does just adding a .db suffix make the name safe? If yes, xattr is not
>> needed; if no, it's not enough. Reading src/rados_export.cc and
>> src/rados_sync.cc, I see nothing like that. What if I have objects
>> "foo" and "foo.db" in a pool?
>
> I'm pretty sure we need to mark the object with a magic xattr.  Which
> probably means the filename itself needs to be mangled to avoid colliding
> with other objects.  Probably an xattr on the object file referring to the
> external mangled file with the k/v content.

Perhaps make the db file use one of the reserved characters that will
never appear in a plain old rados object. $ is the only one that's
really safe..

>> Note to self: the only thing avoiding collisions for e.g. "foo/" and
>> "foo$" is the hash.
> I vaguely recall Colin talking about the trailing /, but we may have
> decided to ignore the problem for now.

Oh I mean anything that gets mapped to @ can cause collisions. "foo@"
and "foo$" will collide. "foo\n" and "foo\\" will collide.

Frankly, my gut instinct right now is "kill it with fire". Collisions
in object names is a miserable problem to have. This would have been
better off with e.g. a HTTP-style %20 escaping mechanism, or a \x20
style one; one that preserves the byte, and does not just replace it
with '@'.
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux