Per Session innodb_flush_log_at_trx_commit poorly documented

Bug #1264306 reported by Jaime Crespo
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.1
Won't Fix
Medium
Borys Belinsky
5.5
Triaged
Medium
Borys Belinsky
5.6
Triaged
Medium
Borys Belinsky
5.7
Triaged
Medium
Borys Belinsky

Bug Description

This and the same section on 5.5 is poorly written and has some documentation bugs:
http://www.percona.com/doc/percona-server/5.6/scalability/innodb_io.html#innodb_use_global_flush_log_at_trx_commit

In summary:

* The feature doc is difficult to understand, and overuses "GLOBAL" when it means "session as if it was set globally"
* I think it has some erroneous information: wrong quoted example and the session variable can always be set, but (hopefully) it will have no effect
* The feature is not documented in any other place, and it requires further discussion than simple parameters settings

I have written an alternative version (please check validity) to at least change the current information:
---------------

This variable is used to enable or disable the effect of the per session value of innodb_flush_log_at_trx_commit.

If the global variable innodb_use_global_flush_log_at_trx_commit is set to 1 (True), the session will use always use the current global value of innodb_flush_log_at_trx_commit. This is the default value.

Under this mode, changing the session variable for innodb_flush_log_at_trx_commit will have no effect for upstream compatibility.

If the global variable innodb_use_global_flush_log_at_trx_commit is set to 0 (False), the user can modify the MySQL commit durability per session, using:

SET SESSION innodb_flush_log_at_trx_commit=N

This change will only affect the transactions in the session where it has changed, while the rest will keep the global innodb_flush_log_at_trx_commit value unless similarly changed.

Tags: doc
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

I agree that innodb_use_global_flush_log_at_trx_commit docs should be improved. The 5.1 innodb_flush_log_at_trx_commit_session docs are IMHO clearer but still targeting the bug to 5.1 too for a review (e.g. is innodb_flush_log_at_trx_commit_session really a global and not session variable?)

tags: added: doc
Jaime Crespo (jynus)
description: updated
Revision history for this message
Jaime Crespo (jynus) wrote :

For future reference, enabling a feature by setting it from 1 to 0 is anti-intuitive. I understand the original requirement of maintaining backwards compatibility, but setting innodb_use_session_flush_log_at_trx_commit to 1 would have been more intuitive.

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-1466

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.