List:Commits« Previous MessageNext Message »
From:Rafal Somla Date:November 7 2007 12:55pm
Subject:Re: bk commit into 5.2 tree (cbell:1.2610) BUG#31383
View as plain text  
Chuck Bell wrote:

> The driver has not locked its tables so it returns an empty buffer and the
> return code of OK (per your insistence). The kernel in the method
> Backup_pump::pump() inspects the return code and then drops the buffer
> because there isn't anything in it. The pump() method returns to the
> Scheduler::step() method which returns to  write_table_data() and then the
> code gets stuck in the loop:
> 
> @491 in data_backup.cc
> 
>     while (sch.init_count > 0)
>     if (sch.step())
>       goto error;
> 
> However, if the driver returns an empty buffer and the return code of READY
> when the lock has not been acquired, the code in the method
> Backup_pump::pump() inspects the return code, identifies that we are waiting
> (state= backup_state::WAITING;) and the drops the buffer because there isn't
> anything in it. The pump() method returns to the Scheduler::step() method
> which returns to  write_table_data() and then the code proceeds past the
> loop on to sch.prepare().

Isn't the problem caused by your get_data() *never* returning READY? That is, 
the change I'm suggesting is not to always return OK but return OK only until 
the tables are locked (which can be checked by inspecting lock_state member). 
Once they are, get_data() *should* return READY and then the above loop will 
terminate I think.

Rafal

Thread
bk commit into 5.2 tree (cbell:1.2610) BUG#31383cbell5 Nov
  • Re: bk commit into 5.2 tree (cbell:1.2610) BUG#31383Rafal Somla6 Nov
    • RE: bk commit into 5.2 tree (cbell:1.2610) BUG#31383Chuck Bell6 Nov
      • Re: bk commit into 5.2 tree (cbell:1.2610) BUG#31383Rafal Somla7 Nov
        • RE: bk commit into 5.2 tree (cbell:1.2610) BUG#31383Chuck Bell7 Nov
          • Re: bk commit into 5.2 tree (cbell:1.2610) BUG#31383Rafal Somla7 Nov
            • RE: bk commit into 5.2 tree (cbell:1.2610) BUG#31383Chuck Bell7 Nov