maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #09787
Re: MDEV-9423: FTWRL and Binlog checkpoint
Hi, Nirbhay!
On Jun 27, Nirbhay Choubey wrote:
> >
> > That seems quite ugly, why not call it from the SST code, after it
> > has called reload_acl_and_cache()? You're basically making FLUSH
> > LOGS behave differently in Galera and non-Galera (if my
> > understanding is correct), which might lead to subtle bugs?
>
> I initially thought of adding the call after reload_acl_and_cache(),
> but there could still be a case when user performs a
> REFRESH_BINARY_LOG before LOCK_log is acquired.
Right, but you didn't fix it. You have
1> FTWRL
2> reload_acl_and_cache()
3> wait_for_last_checkpoint_event()
4> SET global innodb_disallow_writes=1
5> mysql_mutex_lock(LOCK_log)
You've described your case correctly: "when user performs
REFRESH_BINARY_LOG before LOCK_log is acquired". That is, you care when
a user performs REFRESH_BINARY_LOG between 3 and 5. You don't care if
somebody does REFRESH_BINARY_LOG between 2 and 3. So, you can as well
move wait_for_last_checkpoint_event() out of reload_acl_and_cache().
With wait_for_last_checkpoint_event inside reload_acl_and_cache or
outside, you still don't have anything that would prevent user from
doing REFRESH_BINARY_LOG between 3 and 5.
Regards,
Sergei
Chief Architect MariaDB
and security@xxxxxxxxxxx
Follow ups
References