diff mbox

RadosGW crashing on copy for one specific object

Message ID CABBk=J8S_fkBMORDy9RbYLh6HWi+-EzyZefBNPmnBRWNuPOHAg@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Yehuda Sadeh Aug. 21, 2014, 8:39 p.m. UTC
Try this:


Thanks,
Yehuda

On Thu, Aug 21, 2014 at 2:38 AM, Sylvain Munaut
<s.munaut@whatever-company.com> wrote:
> Hi,
>
>
>> If by any chance you applied the previous patch, revert it, as it's
>> wrong. This might fix the issue:
>>
>> diff --git a/src/rgw/rgw_rados.h b/src/rgw/rgw_rados.h
>> index d50fb59..0f13590 100644
>> --- a/src/rgw/rgw_rados.h
>> +++ b/src/rgw/rgw_rados.h
>> @@ -298,6 +298,9 @@ public:
>>
>>    bool has_tail() {
>>      if (explicit_objs) {
>> +      if (objs.size() == 1) {
>> +        return head_obj != objs[0];
>> +      }
>>        return (objs.size() >= 2);
>>      }
>>      return (obj_size > head_size);
>>
>> Let me know if it works for you.
>
> It doesn't build at all.
>
> rgw/rgw_rados.h: In member function ‘bool RGWObjManifest::has_tail()’:
> rgw/rgw_rados.h:302:34: error: no match for ‘operator!=’ in
> ‘((RGWObjManifest*)this)->RGWObjManifest::head_obj !=
> ((RGWObjManifest*)this)->RGWObjManifest::objs.std::map<_Key, _Tp,
> _Compare, _Alloc>::operator[] [with _Key = long unsigned int, _Tp =
> RGWObjManifestPart, _Compare = std::less<long unsigned int>, _Alloc =
> std::allocator<std::pair<const long unsigned int, RGWObjManifestPart>
>>, std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type =
> RGWObjManifestPart, std::map<_Key, _Tp, _Compare, _Alloc>::key_type =
> long unsigned int]((* &0u))’
> ...
>
>
>
> Cheers,
>
>    Sylvain
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Sylvain Munaut Aug. 25, 2014, 9 a.m. UTC | #1
Hi Yehuda,


> diff --git a/src/rgw/rgw_rados.h b/src/rgw/rgw_rados.h
> index ed8f02d..0042df2 100644
> --- a/src/rgw/rgw_rados.h
> +++ b/src/rgw/rgw_rados.h
> @@ -306,6 +306,11 @@ public:
>
>    bool has_tail() {
>      if (explicit_objs) {
> +      if (objs.size() == 1) {
> +        map<uint64_t, RGWObjManifestPart>::iterator iter = objs.begin();
> +        rgw_obj& obj = iter->second.loc;
> +        return head_obj.object != obj.object;
> +      }
>        return (objs.size() >= 2);
>      }
>      return (obj_size > head_size);
>

I confirm that this fixes the issue.

I was able to copy the key and read the resulting copied key.


Cheers,

     Sylvain
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/src/rgw/rgw_rados.h b/src/rgw/rgw_rados.h
index ed8f02d..0042df2 100644
--- a/src/rgw/rgw_rados.h
+++ b/src/rgw/rgw_rados.h
@@ -306,6 +306,11 @@  public:

   bool has_tail() {
     if (explicit_objs) {
+      if (objs.size() == 1) {
+        map<uint64_t, RGWObjManifestPart>::iterator iter = objs.begin();
+        rgw_obj& obj = iter->second.loc;
+        return head_obj.object != obj.object;
+      }
       return (objs.size() >= 2);
     }
     return (obj_size > head_size);