From: Roberto Spadim [mailto:roberto@spadim.com.br]
Sent: Sonntag, 22. September 2013 07:46
To: Vladislav Vaintroub
Cc: maria-developers@lists.launchpad.net
Subject: Re: [Maria-developers] MDEV-5019 - THREADPOOL - Create Information Schema Table for Threadpool

 

Hi guys! new doubts...

1)

threadpool.h don't have information about threadpool_unix.cc structures/interactors

Why should it? The structs were only used in threadpool_unix.cc itself.

 

maybe we should rewrite the threadpool_unix.cc to a .cc file and a .h header file?

You can if you wish, but I see no need. If you plan to write I_S plugin that works only with unix threadpool, you can define it in the same file threadpool_unix.cc , right?

 

samething to windows threadpool

As already discussed, MariaDB on Windows relies on OS to manage threadpool, and there is no simple way to get threadpool diagnostics ( apart from  learning kernel debugging , and equipping yourself with “Windows  Internals” book that describes the structures). There are no interesting structures either, the pool is represented by opaque PTP_POOL

 

2)

other doubt... how i know what threadpoll it's being used? windows/unix? there's a #define that i could use with #ifdef XXX #else #endif ?

 

On Windows, Windows  threadpool is used. Otherwise, Unix threadpool is used . CMake will conditionally compile either threadpool_win.cc or threadpool_unix.cc, dependent on OS. See sql/CMakeLists.txt

 

thanks!

 

 

2013/9/21 Roberto Spadim <roberto@spadim.com.br>

Hi Vladislav!

i did some initial work, check if i'm going to the right direction:

something todo...

ENUM('Y','N'), i never used... i will try some search at sql_show.cc to get this information

 

thd->thread_id, thd->query_id, is listener, is waiting

i didn't found information how could i get the thd, or how to know if a thread is the listener, or a thread is waiting

i know that i have the all_groups[].listener to get listener, but i don't know how to check for example if a waiting_threads is the listener or not

about thread waiting, i didn't understand yet where i could check if it's waiting or not

      

 

well just first steps, i didn't compiled yet, just write the scratch =)

 

thanks!!



 

--

Roberto Spadim
SPAEmpresarial