php-doc-en/reference/mysqlnd_ms/changes.xml

706 lines
21 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<chapter xml:id="mysqlnd-ms.changes" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title xmlns="http://docbook.org/ns/docbook">Change History</title>
<para>
This change history is a high level summary of selected changes
that may impact applications and/or break backwards compatibility.
</para>
<para>
See also the <filename>CHANGES</filename> file in the source distribution
for a complete list of changes.
</para>
<section xml:id="mysqlnd-ms.changes-one-five">
<title xmlns="http://docbook.org/ns/docbook">PECL/mysqlnd_ms 1.5 series</title>
<para>
1.5.0-alpha
<itemizedlist>
<listitem>
<simpara>
Release date: under development
</simpara>
</listitem>
<listitem>
<simpara>
Motto/theme: Tweaking based on user feedback
</simpara>
</listitem>
</itemizedlist>
</para>
<note>
<para>
This is the current development series. All
features are at an early stage. Changes may happen at any time without
prior notice. Please, do not use this version in production environments.
</para>
<para>
The documentation may not reflect all changes yet.
</para>
</note>
<para>
Bug fixes
<itemizedlist>
<listitem>
<para>
Fixed #60605 PHP segmentation fault when mysqlnd_ms is enabled
</para>
</listitem>
</itemizedlist>
</para>
<para>
Feature changes
<itemizedlist>
<listitem>
<para>
Introduced the <literal>node_group</literal> filter.
The filter lets you organize servers (master and slaves)
into groups. Queries can be directed to a certain group of servers
by prefixing the query statement with a SQL hint/comment that contains
the groups configured name. Grouping can be used for
partitioning and sharding, and also to optimize for local caching.
In the case of sharding, a group name can be thought of like a shard key.
All queries for a given shard key will be executed on the
configured shard. Note: both the client and server must support sharding
for sharding to function with mysqlnd_ms.
</para>
</listitem>
<listitem>
<para>
Extended configuration file validation during PHP startup (RINIT).
An <constant>E_WARNING</constant> level error will be thrown if the configuration
file can not be read (permissions), is empty, or the file (JSON) could not be parsed.
Warnings may appear in log files, which depending on how PHP is configured.
</para>
<para>
Distributions that aim to provide a pre-configured setup, including a
configuration file stub, are asked to put <literal>{}</literal> into
the configuration file to prevent this warning about an invalid
configuration file.
</para>
<para>
Further configuration file validation is done when parsing sections
upon opening a connection. Please, note that there may still be situations
when an invalid plugin configuration file does not lead to proper error messages
but a failure to connect.
</para>
</listitem>
<listitem>
<para>
The code examples in the mysqlnd_ms source were updated.
</para>
</listitem>
</itemizedlist>
</para>
</section>
<section xml:id="mysqlnd-ms.changes-one-four">
<title xmlns="http://docbook.org/ns/docbook">PECL/mysqlnd_ms 1.4 series</title>
<para>
1.4.1-beta
<itemizedlist>
<listitem>
<simpara>
Release date: 08/2012
</simpara>
</listitem>
<listitem>
<simpara>
Motto/theme: Tweaking based on user feedback
</simpara>
</listitem>
</itemizedlist>
</para>
<para>
Bug fixes
<itemizedlist>
<listitem>
<para>
Fixed build with PHP 5.5
</para>
</listitem>
</itemizedlist>
</para>
<para>
1.4.0-alpha
<itemizedlist>
<listitem>
<simpara>
Release date: 07/2012
</simpara>
</listitem>
<listitem>
<simpara>
Motto/theme: Tweaking based on user feedback
</simpara>
</listitem>
</itemizedlist>
</para>
<para>
Feature changes
<itemizedlist>
<listitem>
<para>
BC break: Renamed plugin configuration setting <literal>ini_file</literal>
to <literal>config_file</literal>. In early versions the plugin configuration
file used ini style. Back then the configuration setting was named accordingly.
It has now been renamed to reflect the newer file format and to distinguish it
from PHP's own ini file (configuration directives file).
</para>
</listitem>
<listitem>
<para>
Introduced new default charset setting <literal>server_charset</literal>
to allow proper escaping before a connection
is opened. This is most useful when using lazy connections, which are a default.
</para>
</listitem>
<listitem>
<para>
Introduced <literal>wait_for_gtid_timeout</literal> setting to throttle
slave reads that need session consistency. If global transaction identifier are
used and the service level is set to session consistency, the plugin
tries to find up-to-date slaves. The slave status check is done by
a SQL statement. If nothing else is set, the slave status is checked only
one can the search for more up-to-date slaves continues immediately
thereafter. Setting <literal>wait_for_gtid_timeout</literal> instructs the plugin
to poll a slaves status for <literal>wait_for_gtid_timeout</literal> seconds
if the first execution of the SQL statement has shown that the slave is not
up-to-date yet. The poll will be done once per second. This way, the plugin
will wait for slaves to catch up and throttle the client.
</para>
</listitem>
<listitem>
<para>
New failover strategy <literal>loop_before_master</literal>.
By default the plugin does no failover. It is possible to enable
automatic failover if a connection attempt fails. Upto version 1.3
only <literal>master</literal> strategy existed to failover to a master if
a slave connection fails. <literal>loop_before_master</literal> is
similar but tries all other slaves before attempting to connect to the master
if a slave connection fails.
</para>
<para>
The number of attempts can be limited using the <literal>max_retries</literal> option.
Failed hosts can be remembered and skipped in load balancing for the rest of
the web request. <literal>max_retries</literal> and
<literal>remember_failed</literal> are considered experimental although
decent stability is given. Syntax and semantics may change in the future
without prior notice.
</para>
</listitem>
</itemizedlist>
</para>
</section>
<section xml:id="mysqlnd-ms.changes-one-three">
<title xmlns="http://docbook.org/ns/docbook">PECL/mysqlnd_ms 1.3 series</title>
<para>
1.3.2-stable
<itemizedlist>
<listitem>
<simpara>
Release date: 04/2012
</simpara>
</listitem>
<listitem>
<simpara>
Motto/theme: see 1.3.0-alpha
</simpara>
</listitem>
</itemizedlist>
</para>
<para>
Bug fixes
<itemizedlist>
<listitem>
<para>
Fixed problem with multi-master where although in a transaction
the queries to the master weren't sticky and were spread all
over the masters (RR). Still not sticky for Random. Random_once
is not affected.
</para>
</listitem>
</itemizedlist>
</para>
<para>
1.3.1-beta
<itemizedlist>
<listitem>
<simpara>
Release date: 04/2012
</simpara>
</listitem>
<listitem>
<simpara>
Motto/theme: see 1.3.0-alpha
</simpara>
</listitem>
</itemizedlist>
</para>
<para>
Bug fixes
<itemizedlist>
<listitem>
<para>
Fixed problem with building together with QC.
</para>
</listitem>
</itemizedlist>
</para>
<para>
1.3.0-alpha
<itemizedlist>
<listitem>
<simpara>
Release date: 04/2012
</simpara>
</listitem>
<listitem>
<simpara>
Motto/theme: Query caching through quality-of-service concept
</simpara>
</listitem>
</itemizedlist>
</para>
<para>
The 1.3 series aims to improve the performance of applications
and the overall load of an asynchronous MySQL cluster, for example, a MySQL
cluster using MySQL Replication. This is done by transparently replacing
a slave access with a local cache access, if the application allows it by
setting an appropriate quality of service flag. When using MySQL replication
a slave can serve stale data. An application using MySQL replication must
continue to work correctly with stale data. Given that the application
is know to work correctly with stale data, the slave access can transparently
be replace with a local cache access.
</para>
<para>
<link linkend="book.mysqlnd-qc">PECL/mysqlnd_qc</link> serves as a cache
backend. PECL/mysqlnd_qc supports use of various storage locations,
among others main memory, <literal>APC</literal> and <literal>MEMCACHE</literal>.
</para>
<para>
Feature changes
<itemizedlist>
<listitem>
<para>
Added cache option to quality-of-service (QoS) filter.
<itemizedlist>
<listitem>
<simpara>
New configure option <literal>enable-mysqlnd-ms-cache-support</literal>
</simpara>
</listitem>
<listitem>
<simpara>
New constant <literal>MYSQLND_MS_HAVE_CACHE_SUPPORT</literal>.
</simpara>
</listitem>
<listitem>
<simpara>
New constant <literal>MYSQLND_MS_QOS_OPTION_CACHE</literal> to be used
with <function>mysqlnd_ms_set_qos</function>.
</simpara>
</listitem>
</itemizedlist>
</para>
</listitem>
<listitem>
<para>
Support for built-in global transaction identifier feature of MySQL 5.6.5-m8 or newer.
</para>
</listitem>
</itemizedlist>
</para>
</section>
<section xml:id="mysqlnd-ms.changes-one-two">
<title xmlns="http://docbook.org/ns/docbook">PECL/mysqlnd_ms 1.2 series</title>
<para>
1.2.1-beta
<itemizedlist>
<listitem>
<simpara>
Release date: 01/2012
</simpara>
</listitem>
<listitem>
<simpara>
Motto/theme: see 1.2.0-alpha
</simpara>
</listitem>
</itemizedlist>
</para>
<para>
Minor test changes.
</para>
<para>
1.2.0-alpha
<itemizedlist>
<listitem>
<simpara>
Release date: 11/2011
</simpara>
</listitem>
<listitem>
<simpara>
Motto/theme: Global Transaction ID injection and quality-of-service concept
</simpara>
</listitem>
</itemizedlist>
</para>
<para>
In version 1.2 the focus continues to be on supporting MySQL database clusters
with asynchronous replication. The plugin tries to make using the cluster
introducing a quality-of-service filter which applications can use to define
what service quality they need from the cluster. Service levels provided are
eventual consistency with optional maximum age/slave slag, session consistency
and strong consistency.
</para>
<para>
Additionally the plugin can do client-side global transaction id injection
to make manual master failover easier.
</para>
<para>
Feature changes
<itemizedlist>
<listitem>
<para>
Introduced quality-of-service (QoS) filter. Service levels provided by QoS filter:
<itemizedlist>
<listitem>
<simpara>
eventual consistency, optional option slave lag
</simpara>
</listitem>
<listitem>
<simpara>
session consistency, optional option GTID
</simpara>
</listitem>
<listitem>
<simpara>
strong consistency
</simpara>
</listitem>
</itemizedlist>
</para>
</listitem>
<listitem>
<para>
Added the <function>mysqlnd_ms_set_qos</function> function to set the
required connection quality at runtime. The new constants related to
<function>mysqlnd_ms_set_qos</function> are:
<itemizedlist>
<listitem>
<simpara>
<constant>MYSQLND_MS_QOS_CONSISTENCY_STRONG</constant>
</simpara>
</listitem>
<listitem>
<simpara>
<constant>MYSQLND_MS_QOS_CONSISTENCY_SESSION</constant>
</simpara>
</listitem>
<listitem>
<simpara>
<constant>MYSQLND_MS_QOS_CONSISTENCY_EVENTUAL</constant>
</simpara>
</listitem>
<listitem>
<simpara>
<constant>MYSQLND_MS_QOS_OPTION_GTID</constant>
</simpara>
</listitem>
<listitem>
<simpara>
<constant>MYSQLND_MS_QOS_OPTION_AGE</constant>
</simpara>
</listitem>
</itemizedlist>
</para>
</listitem>
<listitem>
<para>
Added client-side global transaction id injection (GTID).
</para>
</listitem>
<listitem>
<para>
New statistics related to GTID:
<itemizedlist>
<listitem>
<simpara>
<literal>gtid_autocommit_injections_success</literal>
</simpara>
</listitem>
<listitem>
<simpara>
<literal>gtid_autocommit_injections_failure</literal>
</simpara>
</listitem>
<listitem>
<simpara>
<literal>gtid_commit_injections_success</literal>
</simpara>
</listitem>
<listitem>
<simpara>
<literal>gtid_commit_injections_failure</literal>
</simpara>
</listitem>
<listitem>
<simpara>
<literal>gtid_implicit_commit_injections_success</literal>
</simpara>
</listitem>
<listitem>
<simpara>
<literal>gtid_implicit_commit_injections_failure</literal>
</simpara>
</listitem>
</itemizedlist>
</para>
</listitem>
<listitem>
<para>
Added <function>mysqlnd_ms_get_last_gtid</function> to fetch the last
global transaction id.
</para>
</listitem>
<listitem>
<para>
Enabled support for multi master without slaves.
</para>
</listitem>
</itemizedlist>
</para>
</section>
<section xml:id="mysqlnd-ms.changes-one-one">
<title xmlns="http://docbook.org/ns/docbook">PECL/mysqlnd_ms 1.1 series</title>
<para>
1.1.0
<itemizedlist>
<listitem>
<simpara>
Release date: 09/2011
</simpara>
</listitem>
<listitem>
<simpara>
Motto/theme: Cover replication basics with production quality
</simpara>
</listitem>
</itemizedlist>
</para>
<para>
The 1.1 and 1.0 series expose a similar feature set. Internally,
the 1.1 series has been refactored to plan for future feature
additions. A new configuration file format has been introduced,
and limitations have been lifted. And the code quality and quality
assurance has been improved.
</para>
<para>
Feature changes
<itemizedlist>
<listitem>
<para>
Added the (chainable) <link linkend="mysqlnd-ms.filter">filter concept</link>:
<itemizedlist>
<listitem>
<simpara>
BC break:
<function>mysqlnd_ms_set_user_pick_server</function>
has been removed. Thehttp://svn.php.net/viewvc/pecl/mysqlnd_ms/trunk/
<link linkend="mysqlnd-ms.filter"><literal>user</literal></link>
filter has been introduced to replace it.
The filter offers similar functionality, but see below for an
explanation of the differences.
</simpara>
</listitem>
</itemizedlist>
</para>
</listitem>
<listitem>
<simpara>
New powerful <acronym>JSON</acronym> based configuration syntax.
</simpara>
</listitem>
<listitem>
<simpara>
<link linkend="mysqlnd-ms.pooling">Lazy connections improved</link>:
security relevant, and state changing commands are covered.
</simpara>
</listitem>
<listitem>
<simpara>
Support for (native) prepared statements.
</simpara>
</listitem>
<listitem>
<para>
New statistics: <literal>use_master_guess</literal>,
<literal>use_slave_guess</literal>.
<itemizedlist>
<listitem>
<simpara>
BC break: Semantics of statistics changed for
<literal>use_slave</literal>, <literal>use_master</literal>.
Future changes are likely. Please see,
<function>mysqlnd_ms_get_stats</function>.
</simpara>
</listitem>
</itemizedlist>
</para>
</listitem>
<listitem>
<simpara>
List of broadcasted messages extended by <literal>ssl_set</literal>.
</simpara>
</listitem>
<listitem>
<simpara>
Library calls now monitored to remember settings for lazy connections:
<literal>change_user</literal>, <literal>select_db</literal>,
<literal>set_charset</literal>, <literal>set_autocommit</literal>.
</simpara>
</listitem>
<listitem>
<simpara>
Introduced <link linkend="ini.mysqlnd-ms.disable-rw-split"><literal>mysqlnd_ms.disable_rw_split</literal></link>.
The configuration setting allows using the load balancing and lazy connection
functionality independently of read write splitting.
</simpara>
</listitem>
</itemizedlist>
</para>
<para>
Bug fixes
<itemizedlist>
<listitem>
<simpara>
Fixed PECL #22724 - Server switching (mysqlnd_ms_query_is_select() case sensitive)
</simpara>
</listitem>
<listitem>
<simpara>
Fixed PECL #22784 - Using mysql_connect and mysql_select_db did not work
</simpara>
</listitem>
<listitem>
<simpara>
Fixed PECL #59982 - Unusable extension with --enable-mysqlnd-ms-table-filter.
Use of the option is NOT supported. You must not used it. Added note to m4.
</simpara>
</listitem>
<listitem>
<simpara>
Fixed Bug #60119 - host="localhost" lost in mysqlnd_ms_get_last_used_connection()
</simpara>
</listitem>
</itemizedlist>
</para>
<para>
The <function>mysqlnd_ms_set_user_pick_server</function> function was removed, and
replaced in favor of a new <literal>user</literal> filter. You can no longer set a
callback function using <function>mysqlnd_ms_set_user_pick_server</function> at
runtime, but instead have to configure it in the plugins configuration file. The <literal>user</literal>
filter will pass the same arguments to the callback as before.
Therefore, you can continue to use the same procedural function as a callback.callback
It is no longer possible to use static class methods, or class methods of
an object instance, as a callback. Doing so will cause the function
executing a statement handled by the plugin to emit an
<constant>E_RECOVERABLE_ERROR</constant> level error, which might look like:
"<literal>(mysqlnd_ms) Specified callback (picker) is not a valid callback</literal>."
Note: this may halt your application.
</para>
</section>
<section xml:id="mysqlnd-ms.changes-one-o">
<title xmlns="http://docbook.org/ns/docbook">PECL/mysqlnd_ms 1.0 series</title>
<para>
1.0.1-alpha
<itemizedlist>
<listitem>
<simpara>
Release date: 04/2011
</simpara>
</listitem>
<listitem>
<simpara>
Motto/theme: bug fix release
</simpara>
</listitem>
</itemizedlist>
</para>
<para>
1.0.0-alpha
<itemizedlist>
<listitem>
<simpara>
Release date: 04/2011
</simpara>
</listitem>
<listitem>
<simpara>
Motto/theme: Cover replication basics to test user feedback
</simpara>
</listitem>
</itemizedlist>
</para>
<para>
The first release of practical use. It features basic automatic read-write splitting,
SQL hints to overrule automatic redirection, load balancing of
slave requests, lazy connections, and optional, automatic use of the master
after the first write.
</para>
<para>
The public feature set is close to that of the 1.1 release.
</para>
<para>
1.0.0-pre-alpha
<itemizedlist>
<listitem>
<simpara>
Release date: 09/2010
</simpara>
</listitem>
<listitem>
<simpara>
Motto/theme: Proof of concept
</simpara>
</listitem>
</itemizedlist>
</para>
<para>
Initial check-in. Essentially a demo of the
<link linkend="book.mysqlnd">mysqlnd</link> plugin API.
</para>
</section>
</chapter>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->