maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #10998
Re: IB: trx_t:: start_time and start_time_micro
Hello Marko!
On Tue, Nov 21, 2017 at 11:59 AM, Marko Mäkelä <marko.makela@xxxxxxxxxxx> wrote:
> Hi Aleksey,
>
> I think that we should remove trx_t::start_time, and always use
> trx_t::start_time_micro.
If that will be the case, then start_time_micro must be the absolute
time, not the relative one like it is now.
--
All the best,
Aleksey Midenkov
@midenok
>
> I shortly discussed this with Vladislav Vaintroub, and he mentioned that the
> microsecond timestamp in THD::start_utime is updated at the start of each
> statement.
> I also looked at his MDEV-12345 performance fix. It looks like
> trx_start_low() is already doing the right thing, except that the
> trx_t::start_time should be removed.
>
> I'd welcome a contributed patch that removes trx_t:.start_time. Or if that
> really is too tricky, convert start_time_micro to start_time.
>
> Marko
>
> On Thu, Nov 16, 2017 at 11:29 AM, Aleksey Midenkov <midenok@xxxxxxxxx>
> wrote:
>>
>> Hello!
>>
>> Different semantics of these 2 members doesn't look good:
>>
>> time_t start_time; /*!< time the state last time became
>> TRX_STATE_ACTIVE */
>> ib_uint64_t start_time_micro; /*!< start time of transaction in
>> microseconds */
>>
>> Either `start_time_micro` should be drawn to the base of `start_time`
>> or it should be explicitly commented that it has nothing to do with
>> `start_time`. I.e. there is nothing wrong on algorithmic level, but
>> such data members may (and certainly would) lead developers to misuse
>> of `start_time_micro`.
>>
>> --
>> All the best,
>>
>> Aleksey Midenkov
>> @midenok
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~maria-developers
>> Post to : maria-developers@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~maria-developers
>> More help : https://help.launchpad.net/ListHelp
>
>
>
>
> --
> Marko Mäkelä, Lead Developer InnoDB
> MariaDB Corporation
>
> DON’T MISS
>
> M|18
>
> MariaDB User Conference
>
> February 26 - 27, 2018
>
> New York City
>
> https://m18.mariadb.com/
References