From 59139cac86641142a8b332f328eaab2cf736d072 Mon Sep 17 00:00:00 2001 From: Ed Costello Date: Mon, 23 Jul 2012 14:38:10 -0400 Subject: [PATCH 1/6] Create note advising disabling profiling for fsynclock() --- source/includes/note-disable-profiling-fsynclock.rst | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 source/includes/note-disable-profiling-fsynclock.rst diff --git a/source/includes/note-disable-profiling-fsynclock.rst b/source/includes/note-disable-profiling-fsynclock.rst new file mode 100644 index 00000000000..5b8a1000571 --- /dev/null +++ b/source/includes/note-disable-profiling-fsynclock.rst @@ -0,0 +1,5 @@ +.. note:: + + The database cannot be locked with :func:`db.fsyncLock()` while profiling is enabled. + You must disable profiling before locking the database with :func:`db.fsyncLock()`. + Disable profiling using :func:`db.setProfilingLevel(0)`; From 4c350fb22a04704fd2dcae8cbd2322f9ca56c33a Mon Sep 17 00:00:00 2001 From: Ed Costello Date: Mon, 23 Jul 2012 14:51:01 -0400 Subject: [PATCH 2/6] Create and include note addressing DOCS-252 fsynclock incompatible with profiling --- source/administration/backups.txt | 2 ++ source/reference/commands.txt | 2 ++ source/reference/javascript.txt | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/source/administration/backups.txt b/source/administration/backups.txt index c758d3a27be..8481751211b 100644 --- a/source/administration/backups.txt +++ b/source/administration/backups.txt @@ -369,6 +369,8 @@ the snapshot has completed, use the following command in the db.runCommand( { fsync: 1, lock: true } ); db.runCommand( { fsync: 1, lock: false } ); +.. include:: /includes/note-disable-profiling-fsynclock.rst + .. _backup-amazon-software-raid: Amazon EBS in Software RAID 10 Configuration diff --git a/source/reference/commands.txt b/source/reference/commands.txt index 86645dcebcb..e0e20e3502c 100644 --- a/source/reference/commands.txt +++ b/source/reference/commands.txt @@ -1375,6 +1375,8 @@ Administration The :func:`db.fsyncLock()` and :func:`db.fsyncUnlock()` helpers in the shell. +.. include:: /includes/note-disable-profiling-fsynclock.rst + .. dbcommand:: dropDatabase The :dbcommand:`dropDatabase` command drops a database, deleting diff --git a/source/reference/javascript.txt b/source/reference/javascript.txt index 209d13cdcc7..7a5fe82ea1c 100644 --- a/source/reference/javascript.txt +++ b/source/reference/javascript.txt @@ -1099,6 +1099,8 @@ Database the :setting:`slowms` to the log even when the database profiler is not active. +.. include:: /includes/note-disable-profiling-fsynclock.rst + .. function:: db.shutdownServer() Shuts down the current :program:`mongod` or :program:`mongos` @@ -1154,6 +1156,8 @@ Database This function locks the database and create a window for :doc:`backup operations `. +.. include:: /includes/note-disable-profiling-fsynclock.rst + .. function:: db.fsyncUnlock() Unlocks a database server to allow writes and reverses the From 242dacb0edc278f83ca4ed1b959e2d056f7aee21 Mon Sep 17 00:00:00 2001 From: Ed Costello Date: Mon, 23 Jul 2012 15:18:58 -0400 Subject: [PATCH 3/6] Revised to move example into separate chunk and fix formatting --- source/includes/note-disable-profiling-fsynclock.rst | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/source/includes/note-disable-profiling-fsynclock.rst b/source/includes/note-disable-profiling-fsynclock.rst index 5b8a1000571..1b19ca31bb5 100644 --- a/source/includes/note-disable-profiling-fsynclock.rst +++ b/source/includes/note-disable-profiling-fsynclock.rst @@ -1,5 +1,9 @@ .. note:: - The database cannot be locked with :func:`db.fsyncLock()` while profiling is enabled. - You must disable profiling before locking the database with :func:`db.fsyncLock()`. - Disable profiling using :func:`db.setProfilingLevel(0)`; + The database cannot be locked with :func:`db.fsyncLock()` while profiling is enabled. + You must disable profiling before locking the database with :func:`db.fsyncLock()`. + Disable profiling using :func:`db.setProfilingLevel()` as follows in the :program:`mongo` shell: + +.. code-block:: javascript + + db.setProfilingLevel(0) From 8410262fe63aef6305b360b47343e660c87aabfc Mon Sep 17 00:00:00 2001 From: Ed Costello Date: Mon, 23 Jul 2012 15:25:59 -0400 Subject: [PATCH 4/6] Revised to fix formatting --- source/administration/backups.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/administration/backups.txt b/source/administration/backups.txt index 8481751211b..f073a40ac29 100644 --- a/source/administration/backups.txt +++ b/source/administration/backups.txt @@ -369,7 +369,7 @@ the snapshot has completed, use the following command in the db.runCommand( { fsync: 1, lock: true } ); db.runCommand( { fsync: 1, lock: false } ); -.. include:: /includes/note-disable-profiling-fsynclock.rst + .. include:: /includes/note-disable-profiling-fsynclock.rst .. _backup-amazon-software-raid: From 32185db710077f211f57928b7373713d442e0c96 Mon Sep 17 00:00:00 2001 From: Ed Costello Date: Mon, 23 Jul 2012 15:26:16 -0400 Subject: [PATCH 5/6] Revised to fix formatting --- source/reference/commands.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/reference/commands.txt b/source/reference/commands.txt index e0e20e3502c..c0784ba5f14 100644 --- a/source/reference/commands.txt +++ b/source/reference/commands.txt @@ -1375,7 +1375,7 @@ Administration The :func:`db.fsyncLock()` and :func:`db.fsyncUnlock()` helpers in the shell. -.. include:: /includes/note-disable-profiling-fsynclock.rst + .. include:: /includes/note-disable-profiling-fsynclock.rst .. dbcommand:: dropDatabase @@ -2172,6 +2172,8 @@ Diagnostics around this functionality in the :program:`mongo` shell. + .. include:: /includes/note-disable-profiling-fsynclock.rst + .. dbcommand:: listCommands The :dbcommand:`listCommands` command generates a list of all From 338138d051a75b7bf62d0726a7e2864f612f1f9e Mon Sep 17 00:00:00 2001 From: Ed Costello Date: Mon, 23 Jul 2012 15:26:22 -0400 Subject: [PATCH 6/6] Revised to fix formatting --- source/reference/javascript.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/reference/javascript.txt b/source/reference/javascript.txt index 7a5fe82ea1c..f9eea90cb0a 100644 --- a/source/reference/javascript.txt +++ b/source/reference/javascript.txt @@ -1099,7 +1099,7 @@ Database the :setting:`slowms` to the log even when the database profiler is not active. -.. include:: /includes/note-disable-profiling-fsynclock.rst + .. include:: /includes/note-disable-profiling-fsynclock.rst .. function:: db.shutdownServer() @@ -1156,7 +1156,7 @@ Database This function locks the database and create a window for :doc:`backup operations `. -.. include:: /includes/note-disable-profiling-fsynclock.rst + .. include:: /includes/note-disable-profiling-fsynclock.rst .. function:: db.fsyncUnlock()