WT-2711 Change statistics log configuration options (#2834)

No longer support setting the statistics_log path in WT_CONNECTION::reconfigure.
No longer support setting a custom name for statistics files, only allow a destination directory.
Be more explicit about which logging configuration options are allowed in WT_CONNECTION::reconfigure.

The aim of these changes is to avoid situations where applications that embed WiredTiger allow their users to overwrite unexpected files on a file system.

This potentially requires an upgrade step for applications that were specifying a non-standard file name component for statistics log file names, it's not backward compatible.
This commit is contained in:
Keith Bostic
2016-07-08 00:42:41 -04:00
committed by Alex Gorrod
parent c33bc33a9a
commit 9cc5d0f4b1
18 changed files with 436 additions and 294 deletions

View File

@@ -988,6 +988,10 @@ allExample()
/*! [Statistics logging] */
conn.close(null);
if (false) { // MIGHT_NOT_RUN
/*
* Don't run this code, statistics logging doesn't yet support tables.
*/
/*! [Statistics logging with a table] */
conn = wiredtiger.open(home,
"create," +
@@ -995,23 +999,13 @@ allExample()
/*! [Statistics logging with a table] */
conn.close(null);
/*! [Statistics logging with all tables] */
conn = wiredtiger.open(home,
"create,statistics_log=(sources=(\"table:\"))");
/*! [Statistics logging with all tables] */
conn.close(null);
if (false) { // MIGHT_NOT_RUN
/*
* This example code gets run, and a non-existent log file path might
* cause the open to fail. The documentation requires code snippets,
* use if (false) to avoid running it.
* Don't run this code, statistics logging doesn't yet support indexes.
*/
/*! [Statistics logging with path] */
/*! [Statistics logging with a source type] */
conn = wiredtiger.open(home,
"create," +
"statistics_log=(wait=120,path=/log/log.%m.%d.%y)");
/*! [Statistics logging with path] */
"create,statistics_log=(sources=(\"index:\"))");
/*! [Statistics logging with a source type] */
conn.close(null);
/*