[koha-commits] main Koha release repository branch 3.14.x updated. v3.14.06-17-g1de3d85

Git repo owner gitmaster at git.koha-community.org
Fri May 16 11:49:53 CEST 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "main Koha release repository".

The branch, 3.14.x has been updated
       via  1de3d85574568b8eef769dc5d16af879b920b65f (commit)
       via  82f5b527d8cb79e8d1309b42faa461bcea12924d (commit)
      from  a2c471dc40fc9a049e554282eb0507e0d94a2cf0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 1de3d85574568b8eef769dc5d16af879b920b65f
Author: Galen Charlton <gmc at esilibrary.com>
Date:   Mon Mar 10 22:48:03 2014 +0000

    Bug 10611: (follow-up) cache DBMS driver code in context object
    
    Rather than use a package-level variable, use an object-level
    one.
    
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>
    (cherry picked from commit 7d39b3c72ea2422b09e3411bef974d87aecdabf9)
    Signed-off-by: Fridolin Somers <fridolin.somers at biblibre.com>
    
    Conflicts:
    	C4/Context.pm

commit 82f5b527d8cb79e8d1309b42faa461bcea12924d
Author: Jonathan Druart <jonathan.druart at biblibre.com>
Date:   Tue Jul 16 11:53:47 2013 +0200

    Bug 10611: Use mysql_auto_reconnect instead of ping
    
    DBD::Mysql provides a mysql_auto_reconnect flag. Using it avoids
    the time required to do a $dbh->ping().
    
    Benchmarks:
    
    use Modern::Perl;
    use C4::Context;
    for ( 1 .. 1000 ) {
        $dbh = C4::Context->dbh;
    }
    
    * without this patch on a local DB:
    perl t.pl  0,49s user 0,02s system 98% cpu 0,525 total
    * without this patch on a remote DB:
    perl t.pl  0,52s user 0,05s system 1% cpu 37,358 total
    * with this patch on a local DB:
    perl t.pl  0,46s user 0,04s system 99% cpu 0,509 total
    * with this patch on a remote DB:
    perl t.pl  0,49s user 0,02s system 56% cpu 0,892 total
    
    Testing the auto reconnect:
    use Modern::Perl;
    use C4::Context;
    my $ping = $dbh->ping;
    say $ping;
    $dbh->disconnect;
    $ping = $dbh->ping;
    say $ping;
    
    Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel at gmail.com>
    Comment: Real improvement. No koha-qa errors
    
    prove t/db_dependent/Circulation_issuingrules.t produces no error
    prove t/db_dependent/Context.t produces no error
    
    Test
    1) dumped Koha DB, load it on a non-local server
    2) run sample script whit and without patch, local and remote
    
    use Modern::Perl;
    use C4::Context;
    for ( 1 .. 100000 ) {
        my $dbh = C4::Context->dbh;
    }
    
    Main difference I note is with remote server
    a) without patch
    real    0m16.357s
    user    0m2.592s
    sys     0m2.132s
    
    b) with patch
    real    0m0.259s
    user    0m0.240s
    sys     0m0.012s
    
    I think this could be good for DBs placed on
    remote servers
    
    Bug 10611: add a "new" parameter to C4::Context->dbh
    
    When dbh->disconnect is called and the mysql_auto_reconnect flag is set,
    the dbh is not recreated: the old one is used.
    
    Adding a new flag, we can now force the C4::Context->dbh method to
    return a new dbh.
    
    Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel at gmail.com>
    
    Bug 10611: Followup: remove useless calls to dbh->disconnect
    
    These 3 calls to disconnect are done at the end of the script, they are
    useless.
    
    Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel at gmail.com>
    Signed-off-by: Paul Poulain <paul.poulain at biblibre.com>
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>
    (cherry picked from commit 4ae3665ad8afb5d283d989c4622a91690e1c4f8a)
    Signed-off-by: Fridolin Somers <fridolin.somers at biblibre.com>
    
    Conflicts:
    	C4/Context.pm

-----------------------------------------------------------------------

Summary of changes:
 C4/Context.pm            |   18 ++++++++++++++----
 installer/install.pl     |    2 --
 misc/cronjobs/j2a.pl     |    1 -
 sms/sms_listen.pl        |    1 -
 t/db_dependent/Context.t |    5 +----
 5 files changed, 15 insertions(+), 12 deletions(-)


hooks/post-receive
-- 
main Koha release repository


More information about the koha-commits mailing list