← Back to team overview

maria-developers team mailing list archive

Re: MDEV-5019 - THREADPOOL - Create Information Schema Table for Threadpool


From: Roberto Spadim [mailto:roberto@xxxxxxxxxxxxx] 
Sent: Sonntag, 22. September 2013 07:46
To: Vladislav Vaintroub
Cc: maria-developers@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Maria-developers] MDEV-5019 - THREADPOOL - Create Information
Schema Table for Threadpool
Hi guys! new doubts...
threadpool.h don't have information about threadpool_unix.cc
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
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 
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
2013/9/21 Roberto Spadim <roberto@xxxxxxxxxxxxx>
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 =)

Roberto Spadim