Change behavior of innodb_flush_log_at_trx_commit_session variable

Bug #635399 reported by Vadim Tkachenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Fix Released
High
Unassigned

Bug Description

1. We need to check if we can define innodb_flush_log_at_trx_commit as session variable, so one can change it as
SET SESSION innodb_flush_log_at_trx_commit=<new value>

2. If that is not possible we need to change innodb_flush_log_at_trx_commit_session behavior.

New behavior :
-It accepts only 0-2 values.
-when connection starts innodb_flush_log_at_trx_commit_session takes value from innodb_flush_log_at_trx_commit.

Changed in percona-server:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Yasufumi Kinoshita (yasufumi-kinoshita)
milestone: none → 5.1-12.0
Revision history for this message
Yasufumi Kinoshita (yasufumi-kinoshita) wrote :

innodb_flush_log_at_trx_commit is currently global variable.
If it changes to session value, the compatibility is broken.

For session variable, the GLOBAL is only default value when starting session.

I think you ignore the compatibility. I cannot accept it.

Revision history for this message
Vadim Tkachenko (vadim-tk) wrote : Re: [Bug 635399] Re: Change behavior of innodb_flush_log_at_trx_commit_session variable

Can you show me scenario when compatibility is broken?
I do not see it.

On Sun, Sep 26, 2010 at 10:21 PM, Yasufumi Kinoshita
<email address hidden> wrote:
> innodb_flush_log_at_trx_commit is currently global variable.
> If it changes to session value, the compatibility is broken.
>
> For session variable, the GLOBAL is only default value when starting
> session.
>
> I think you ignore the compatibility. I cannot accept it.
>
> --
> Change behavior of innodb_flush_log_at_trx_commit_session variable
> https://bugs.launchpad.net/bugs/635399
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Percona Server with XtraDB: Triaged
>
> Bug description:
> 1. We need to check if we can define innodb_flush_log_at_trx_commit as session variable, so one can change it as
> SET SESSION innodb_flush_log_at_trx_commit=<new value>
>
> 2. If that is not possible we need to change innodb_flush_log_at_trx_commit_session behavior.
>
> New behavior :
> -It accepts only 0-2 values.
> -when connection starts innodb_flush_log_at_trx_commit_session takes value from innodb_flush_log_at_trx_commit.
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/percona-server/+bug/635399/+subscribe
>

--
Vadim Tkachenko, CTO, Percona Inc.
Phone +1-888-401-3403,  Skype: vadimtk153
Schedule meeting: http://tungle.me/VadimTkachenko

Revision history for this message
Peter Zaitsev (pz-percona) wrote :

Yasufumi,

Can you come up with use case when compatibility will really be broken (not
in theory) ?

If it changes to be SESSION variable changing it in my.cnf file will still
work
Also SET GLOBAL innodb_flush_log_at_trx_commit=X will also work for all
practical purposes - the new transactions in
other connections will use new behavior.

On Sun, Sep 26, 2010 at 10:21 PM, Yasufumi Kinoshita <
<email address hidden>> wrote:

> innodb_flush_log_at_trx_commit is currently global variable.
> If it changes to session value, the compatibility is broken.
>
> For session variable, the GLOBAL is only default value when starting
> session.
>
> I think you ignore the compatibility. I cannot accept it.
>
> --
> Change behavior of innodb_flush_log_at_trx_commit_session variable
> https://bugs.launchpad.net/bugs/635399
> You received this bug notification because you are a member of Percona
> developers, which is the registrant for Percona Server.
>
> Status in Percona Server with XtraDB: Triaged
>
> Bug description:
> 1. We need to check if we can define innodb_flush_log_at_trx_commit as
> session variable, so one can change it as
> SET SESSION innodb_flush_log_at_trx_commit=<new value>
>
> 2. If that is not possible we need to change
> innodb_flush_log_at_trx_commit_session behavior.
>
> New behavior :
> -It accepts only 0-2 values.
> -when connection starts innodb_flush_log_at_trx_commit_session takes value
> from innodb_flush_log_at_trx_commit.
>
>
>

--
Peter Zaitsev, CEO, Percona Inc.
Tel: +1 888 401 3401 ext 501 Skype: peter_zaitsev
24/7 Emergency Line +1 888 401 3401 ext 911

Percona Training Workshops
http://www.percona.com/training/

Revision history for this message
Yasufumi Kinoshita (yasufumi-kinoshita) wrote :

"
Also SET GLOBAL innodb_flush_log_at_trx_commit=X will also work for all
practical purposes - the new transactions in
other connections will use new behavior.
"
it is wrong.

All thd values are made independent.
So, not affect to new transactions on exist sessions.
(affect new sessions only)

Revision history for this message
Peter Zaitsev (pz-percona) wrote :

Yasufumi,

Yeas I understand that.... but people do not set this option back and forth.

I think it is a lot less confusing than adding another variable with very
complex logic.

If you want 100% compatibility we can go the same way as with long query
time and have
variable use_session_innodb_flush_log_at_trx_commit which you would need
to set to 1
to enable such behavior.

On Sun, Sep 26, 2010 at 11:08 PM, Yasufumi Kinoshita <
<email address hidden>> wrote:

> "
> Also SET GLOBAL innodb_flush_log_at_trx_commit=X will also work for all
> practical purposes - the new transactions in
> other connections will use new behavior.
> "
> it is wrong.
>
> All thd values are made independent.
> So, not affect to new transactions on exist sessions.
> (affect new sessions only)
>
> --
> Change behavior of innodb_flush_log_at_trx_commit_session variable
> https://bugs.launchpad.net/bugs/635399
> You received this bug notification because you are a member of Percona
> developers, which is the registrant for Percona Server.
>
> Status in Percona Server with XtraDB: Triaged
>
> Bug description:
> 1. We need to check if we can define innodb_flush_log_at_trx_commit as
> session variable, so one can change it as
> SET SESSION innodb_flush_log_at_trx_commit=<new value>
>
> 2. If that is not possible we need to change
> innodb_flush_log_at_trx_commit_session behavior.
>
> New behavior :
> -It accepts only 0-2 values.
> -when connection starts innodb_flush_log_at_trx_commit_session takes value
> from innodb_flush_log_at_trx_commit.
>
>
>

--
Peter Zaitsev, CEO, Percona Inc.
Tel: +1 888 401 3401 ext 501 Skype: peter_zaitsev
24/7 Emergency Line +1 888 401 3401 ext 911

Percona Training Workshops
http://www.percona.com/training/

Changed in percona-server:
milestone: 5.1-12.0 → 5.1.53-12.4
Changed in percona-server:
milestone: 5.1.53-12.4 → 5.5-20beta
Revision history for this message
Yasufumi Kinoshita (yasufumi-kinoshita) wrote :

How about
innodb_use_global_flush_log_at_trx_commit = [0|1] ?
(default 1)

0: session use
1: keep compatibility

Revision history for this message
Vadim Tkachenko (vadim-tk) wrote :

Yasufumi,

I accept it.
Please implement.

Changed in percona-server:
status: Triaged → In Progress
Changed in percona-server:
status: In Progress → Fix Committed
Revision history for this message
Fred Linhoss (fred-linhoss) wrote :
Changed in percona-server:
status: Fix Committed → Fix Released
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-426

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.