← Back to team overview

maria-developers team mailing list archive

Re: [Commits] ef590fa: MDEV-7409 On RBR, extend the PROCESSLIST info to include at least the name of the recently used table


Sachin Setiya <sachin.setiya@xxxxxxxxxxx> writes:

> On Tue, Jan 24, 2017 at 2:32 AM, Daniel Black <daniel.black@xxxxxxxxxxx>
> wrote:

>> On 24/01/17 04:30, SachinSetiya wrote:
>> > revision-id: ef590faa0e21d25a2dc5153f938135612b17ecbc
>> (mariadb-10.1.20-31-gef590fa)
>> >    thd_proc_info(thd, message);
>> > +  DBUG_EXECUTE_IF("should_sleep_for_mdev7409",{
>> > +                  my_sleep(500000);
>> > +                  };);
>> Shouldn't these be DEBUG_SYNC_C("do_exec_row");
>> and then use debug_sync to generate test synchronisation.
>> I tried using DEBUG_SYNC and DEBUG_SYNC_C

> But mtr test is not waiting, this is because ::do_exec_row is called by SQL
> thread is there a way to
> stop SQL thread and add sync points ?

You use DBUG_EXECUTE_IF() to trigger code inside the SQL thread that then
does the appropriate debug_sync command. For an example, see the use of
rpl_parallel_scheduled_gtid_0_x_100 in
mysql-test/extra/rpl_tests/rpl_parallel.inc and sql/rpl_parallel.cc.

Do not ever use sleeps as a way to synchronise in test cases (or anywhere).

> +  my_snprintf(msg, sizeof(msg),"Write_rows_log_event::write_row() on table %s",
> +                   m_table->s->table_name.str);

Since you are anyway changing the message, I would put something more
appropriate here. Putting internal server source code names like
Write_rows_log_event::write_row() in SHOW PROCESSLIST does not seem

 - Kristian.

Follow ups