Re: RGW : Transaction Id in response?

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

 



On Sat, Feb 28, 2015 at 6:54 AM, ZHOU Yuan <dunk007@xxxxxxxxx> wrote:
> On Fri, Feb 27, 2015 at 6:31 PM, Abhishek Dixit <dixitabhi@xxxxxxxxx> wrote:
>> On Thu, Feb 26, 2015 at 10:51 PM, Yehuda Sadeh-Weinraub
>> <yehuda@xxxxxxxxxx> wrote:
>>>
>>>
>>> ----- Original Message -----
>>>> From: "Abhishek Dixit" <dixitabhi@xxxxxxxxx>
>>>> To: "ceph-devel" <ceph-devel@xxxxxxxxxxxxxxx>
>>>> Sent: Wednesday, February 25, 2015 8:35:40 PM
>>>> Subject: RGW : Transaction Id in response?
>>>>
>>>> Hi,
>>>>
>>>> I was doing comparison of Open Stack Swift response headers and Ceph
>>>> RGW response.
>>>> This is in regard to X-Trans-Id header in response from Open Stack
>>>> Swift storage.
>>>> Swift response to a request always have the header "X-Trans-Id".
>>>> X-Trans-Id : A unique transaction identifier for this request.
>>>>
>>>> X-Trans-Id seems to serve two purpose:
>>>> 1. Every log messages for a request will carry this and aid in
>>>> debugging/analyzing.
>>>> 2. Benchmarking for latency.
>>>>
>>>> So, do we have similar unique identifier in Ceph RGW response which
>>>> associates with each request?
>>>>
>>>> Or do we need add support for this?
>>>>
>>>
>>> At the moment there is no such identifier. We can leverage the rados client instance id that each radosgw instance gets when connecting to the backend, and there's also a unique running number that we use to identify each request within that gateway. We can probably concatenate these and return it as the unique identifier.
>>>
>>> Yehuda
>>>
>>
>>
>> Hi Yehuda,
>>
>> I will add "X-Trans-Id" as per you suggested approach.
>> I have opened a new issue particularly for adding "X-Trans-Id" as many
>> other issues report absence of this header.
>>
>> I have assigned this to myself.
>> http://tracker.ceph.com/issues/10970
>>
>
>
> Hi Yehuda, Abhishek,
>
> may be we should follow the swift way considering the goal is to keep
> compatible with swift? This might make the log analysis a bit easier
> for swift cluster operators.
>
> def generate_trans_id(trans_id_suffix):
>     return 'tx%s-%010x%s' % (
>         uuid.uuid4().hex[:21], time.time(), quote(trans_id_suffix))
>
> The trans_id_suffix is configurable in swift setup.
>
> Thanks, -yuan
>
>> Thanks
>> Abhishek Dixit
>> --
>> 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


Hi Yehuda, Yuan

req_state already has req_id generated by concatenating instance_id
and RGWRequest id field
But this RGWRequest id field is not set when new RGWRequest is done in
civetweb_callback function.
So, id remains as zero.
For "new RGWLoadGenRequest" and "new RGWFCGXRequest" id is updated to
max_req_id.
So do we need to fix req->id for new RGWRequest of civetweb_callback
as at this point only, request are generated in my setup?

Also, I have added uuid field in RGWRequest, from which we derive
trans_id field added in struct req_state.
This field trans_id of struct req_state is used when we are sending
Swift response.
I have concatenated trans_id with current time in milliseconds to
generate X-Trans-Id header in Swift response.

I have created a pull request on above lines.
https://github.com/ceph/ceph/pull/4023

Thanks
Abhishek
--
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