Releases: techfromsage/tripod-php
Composites take into account read preference.
This release makes composites listen to the read preference.
Only ensureIndexes for indexes relevant to the target repSet
Event hooks
Fixed incorrect char encoding when generating search documents
This fixes two UTF-8 issues when generating search documents:
- When generating search documents tripod was applying utf8_encode() to all values, but this assumes the input to be ISO-8859-1, and can garble non-ASCII-range characters from other char encodings, including UTF-8 itself.
- The search indices were being passed through strtolower(), which does not respect non-ASCII characters, modified this to use mb_strtolower().
Truncate indexed fields in table rows if length too long
Mongo 2.6 introduced stricter index length validation. This release will attempt to save a table row document, and if an exception is thrown, will truncate all of the index fields that exceed 1024 - length of index name
bytes.
Type check subjects, predicates, and values
Only allow strings for subjects predicates and resource values, and scalars for literal values.
Incremental saves, more resilient job queueing, impact index bug, deprecated redis server location
This release adds:
- Incremental updates using
$set
,$unset
etc. for much more performance when saving to large CBDs (see #71) - Deprecated
MONGO_TRIPOD_RESQUE_SERVER
in favour ofRESQUE_SERVER
. There can only ever be one resque server in your app. - Better detection of redis fails, with 5 retries (see #79)
- Bug with impact indexes on views (see #76)
Remove socketTimeoutMS
This was giving us some issues when upgrading tripod to run against a DB with previously created indexes on an older version of the PECL driver, so we have removed it as it is unnecessary anyhow in the composites.
Manual and configured queues use the tripod queue namespaces
The process queue allows you to specify queues for composite specfication (views, tables, search) and also set the queue name via Tripod instantiation. That being said, the queue names still needed to contain the default Tripod queue names as a namespace to avoid environment collisions and whatnot, so this release does that.
For example, if a specification contains the ‘queue’ attribute ‘wibble’, it will be placed either in:
tripod::{$APP_ENV}::apply::wibble
or
tripod::apply::wibble
(depending whether or not $APP_ENV is set)
If you manually set a queue on Tripod init:
$tripod = new \Tripod\Mongo\Driver(‘CBD_foo’, ‘foo’, array(OP_ASYNC=>array(OP_QUEUE=>’foobar’));
operations would be sent to:
tripod::$APP_ENV::discover::foobar
tripod::$APP_ENV::apply::foobar
or
tripod::discover::foobar
tripod::apply::foobar
if $APP_ENV isn’t set.
Namespaces and Resque-based process queue
This release includes two massively breaking changes:
- Tripod is now namespaced: all of the
MongoTripodWhatever
classes are now\Tripod\Mongo\Whatever
- The Mongo based process queue has been replaced with a Resque based queue. There are two jobs/queues that actually do the composite generation. See more about this here: https://github.com/talis/tripod-php/blob/master/docs/operations.md
This introduces another external dependency on Redis for Resque.