maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #12984
Re: f3603cbfaeb: report progress
Hi, Nikita!
On Nov 15, Nikita Malyavin wrote:
> revision-id: f3603cbfaeb (mariadb-10.5.2-483-gf3603cbfaeb)
> parent(s): 3b6038bee88
> author: Nikita Malyavin
> committer: Nikita Malyavin
> timestamp: 2021-01-29 03:47:52 +1000
> message:
>
> report progress
Perhaps, squash this with your commit "test progress reporting" ?
> diff --git a/sql/sql_table.cc b/sql/sql_table.cc
> index 29d0f487303..87dbe226c2e 100644
> --- a/sql/sql_table.cc
> +++ b/sql/sql_table.cc
> @@ -11300,6 +11300,9 @@ static int online_alter_read_from_binlog(THD *thd, rpl_group_info *rgi,
>
> IO_CACHE *log_file= log->flip();
>
> + thd_progress_report(thd, 0, my_b_write_tell(log_file)
> + / rgi->tables_to_lock->m_conv_table->s->reclength);
1. why do you do this "/ rgi->...->s->reclength" ?
2. How does it work with your "cache flipping"? While data is copied
between tables, concurrent connections write into an IO_CACHE.
Then you flip, they what, write into the second IO_CACHE?
What file length will you use here in thd_progress_report()?
> +
> do
> {
> const auto *descr_event= rgi->rli->relay_log.description_event_for_exec;
> @@ -11319,6 +11322,9 @@ static int online_alter_read_from_binlog(THD *thd, rpl_group_info *rgi,
> free_root(&event_mem_root, MYF(MY_KEEP_PREALLOC));
> if (ev != rgi->rli->relay_log.description_event_for_exec)
> delete ev;
> + thd_progress_report(thd, my_b_tell(log_file)
> + / rgi->tables_to_lock->m_conv_table->s->reclength,
> + thd->progress.max_counter);
> }
> while(!error);
Regards,
Sergei
VP of MariaDB Server Engineering
and security@xxxxxxxxxxx
Follow ups