MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Guilhem Bichot Date:July 27 2009 11:46am
Subject:Re: bzr commit into mysql-6.0-perfschema branch (marc.alff:3150)
View as plain text  
Hello Marc,

Marc Alff a écrit, Le 10.07.2009 19:07:
> Please note that the explanation I am offering here:
> - is not implemented
> - is not documented in WL
> - has not been fully discussed and approved yet,
> since work on the THREADS table was stalled.
> This is only where I would like personally the performance schema to go,
> so having a picture of the long term goal helps understanding, but you
> may *not* use that information to claim that the current code is
> incomplete, because this is not supposed to be in the code yet.
> I am sure that by the time THREADS is fully discussed, some details will
> change.
> 
> performance_schema.THREADS will show "jobs" running in the server.
> A job is either real or virtual.
> A real job is an OS thread (pthread_t)
> A virtual job is a THD like object, picked up by real threads in a
> thread pool.
> A job is either a bound to a connection or connectionless
> A job bound to a connection is a THD
> A connectionless job is typically a background job
<cut lots of explanations>
> So, to summarize, in case of thread pools:
> 
> The THD::ID <==> PSI_thread::thread_id association never changes,
> a given PSI_thread is bound to a given THD for the life of THD.
> Note the '<==>' notation.
> 
> The PSI_thread::thread_id <--> pthread_t association always changes,
> each time a job is picked from or returned to the pool.
> Note the '<-->' notation.
> 
> THD::ID <=(permanent)=> PSI_thread::thread_id <-(temporary)-> pthread_t

I think I followed so far. It was really detailed, thanks.

> That is why THD::store_global() does not call mysql_thread_set_psi_id().

Uh, here I don't understand.
Given that "The THD::ID <==> PSI_thread::thread_id association never 
changes", I would expect that PSI_thread::thread_id is set once for all 
shortly after when the THD is built, so for example in THD's 
constructor, or in THD::store_globals... ?
What am I missing?

Thread
bzr commit into mysql-6.0-perfschema branch (marc.alff:3150) Marc Alff21 May
  • Re: bzr commit into mysql-6.0-perfschema branch (marc.alff:3150)Guilhem Bichot26 May
    • Re: bzr commit into mysql-6.0-perfschema branch (marc.alff:3150)Marc Alff26 May
      • Re: bzr commit into mysql-6.0-perfschema branch (marc.alff:3150)Guilhem Bichot28 May
        • Re: bzr commit into mysql-6.0-perfschema branch (marc.alff:3150)Marc Alff1 Jul
          • Re: bzr commit into mysql-6.0-perfschema branch (marc.alff:3150)Guilhem Bichot10 Jul
            • Re: bzr commit into mysql-6.0-perfschema branch (marc.alff:3150)Marc Alff10 Jul
              • Re: bzr commit into mysql-6.0-perfschema branch (marc.alff:3150)Guilhem Bichot27 Jul
                • Re: bzr commit into mysql-6.0-perfschema branch (marc.alff:3150)Marc Alff28 Jul
                  • Re: bzr commit into mysql-6.0-perfschema branch (marc.alff:3150)Guilhem Bichot28 Jul