diff --git a/Documentation/5.3/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.cs b/Documentation/5.3/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.cs index 1f79c1fa48..8ab0deeb5a 100644 --- a/Documentation/5.3/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.cs +++ b/Documentation/5.3/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.cs @@ -30,7 +30,7 @@ public ConfigRevisions() // ------------------------ // * A revision will be created anytime a document is modified or deleted. // * Revisions of a deleted document can be accessed in the Revisions Bin view. - // * At least 100 of the latest revisions will be kept. + // * Only the latest 100 revisions will be kept. Older ones will be discarded. // * Older revisions will be removed if they exceed 7 days on next revision creation. // * A maximum of 15 revisions will be deleted each time a document is updated, // until the defined '# of revisions to keep' limit is reached. @@ -174,7 +174,7 @@ public async Task ConfigRevisionsAsync() // ------------------------ // * A revision will be created anytime a document is modified or deleted. // * Revisions of a deleted document can be accessed in the Revisions Bin view. - // * At least 100 of the latest revisions will be kept. + // * Only the latest 100 revisions will be kept. Older ones will be discarded. // * Older revisions will be removed if they exceed 7 days on next revision creation. // * A maximum of 15 revisions will be deleted each time a document is updated, // until the defined '# of revisions to keep' limit is reached. diff --git a/Documentation/5.3/Samples/nodejs/document-extensions/revisions/client-api/operations/configureRevisions.js b/Documentation/5.3/Samples/nodejs/document-extensions/revisions/client-api/operations/configureRevisions.js index 2308f8ad86..7ca11f5595 100644 --- a/Documentation/5.3/Samples/nodejs/document-extensions/revisions/client-api/operations/configureRevisions.js +++ b/Documentation/5.3/Samples/nodejs/document-extensions/revisions/client-api/operations/configureRevisions.js @@ -19,7 +19,7 @@ async function configureRevisions() { // ------------------------ // * A revision will be created anytime a document is modified or deleted. // * Revisions of a deleted document can be accessed in the Revisions Bin view. - // * At least 100 of the latest revisions will be kept. + // * Only the latest 100 revisions will be kept. Older ones will be discarded. // * Older revisions will be removed if they exceed 7 days on next revision creation. // * A maximum of 15 revisions will be deleted each time a document is updated, // until the defined '# of revisions to keep' limit is reached. diff --git a/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/images/revisions_revisions-bin.png b/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/images/revisions_revisions-bin.png index 33d11b5a2d..6324beb480 100644 Binary files a/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/images/revisions_revisions-bin.png and b/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/images/revisions_revisions-bin.png differ diff --git a/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/images/revisions_revisions-bin.snag b/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/images/revisions_revisions-bin.snag index a6793eaabf..a70c072260 100644 Binary files a/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/images/revisions_revisions-bin.snag and b/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/images/revisions_revisions-bin.snag differ diff --git a/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/overview.dotnet.markdown b/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/overview.dotnet.markdown index a1d7177517..4297d327af 100644 --- a/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/overview.dotnet.markdown +++ b/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/overview.dotnet.markdown @@ -178,10 +178,15 @@ Let's play with revisions a little to get a taste of its advantages. ![Revision for Document Modification](images\revisions_modify-document.png "Revision for Document Modification") 5. **Delete the document**. - Though you deleted the document, its **audit trail** is **not lost**: all revisions were moved to the [Revisions Bin](../../studio/database/document-extensions/revisions#revisions-bin), - including a new revision (called "Delete-Revision"), created to indicate that the document was deleted. - - To see the "orphaned" revisions (whose parent document was deleted): + Though you deleted the document, its **audit trail** is **not lost**: all its revisions are moved to the [Revisions Bin](../../studio/database/document-extensions/revisions#revisions-bin), + including a new revision (called "Delete Revision"), created to indicate that the document was deleted. + + {INFO: } + * A "Delete Revision" is created only if the deleted document has revisions. + * If a document has no revisions, a "Delete Revision" will be created only if the Revisions Configuration is set and enabled for its collection. + {INFO/} + + To see the revisions created for the document before it was deleted: * Open the `Documents > Revisions Bin` section in the Studio * Click the deleted document's ID diff --git a/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/overview.js.markdown b/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/overview.js.markdown index 970c786009..990ff11e84 100644 --- a/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/overview.js.markdown +++ b/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/overview.js.markdown @@ -178,11 +178,16 @@ Let's play with revisions a little to get a taste of its advantages. ![Revision for Document Modification](images\revisions_modify-document.png "Revision for Document Modification") 5. **Delete the document**. - Though you deleted the document, its **audit trail** is **not lost**: all revisions were moved to the [Revisions Bin](../../studio/database/document-extensions/revisions#revisions-bin), - including a new revision (called "Delete-Revision"), created to indicate that the document was deleted. + Though you deleted the document, its **audit trail** is **not lost**: all its revisions are moved to the [Revisions Bin](../../studio/database/document-extensions/revisions#revisions-bin), + including a new revision (called "Delete Revision"), created to indicate that the document was deleted. - To see the "orphaned" revisions (whose parent document was deleted): - * Open the `Documents > Revisions Bin` section in the Studio + {INFO: } + * A "Delete Revision" is created only if the deleted document has revisions. + * If a document has no revisions, a "Delete Revision" will be created only if the Revisions Configuration is set and enabled for its collection. + {INFO/} + + To see the revisions created for the document before it was deleted: + * Open the `Documents > Revisions Bin` section in the Studio * Click the deleted document's ID ![Revisions Bin](images\revisions_revisions-bin.png "Revisions Bin") diff --git a/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/overview.python.markdown b/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/overview.python.markdown index 5f41dc282f..c062324940 100644 --- a/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/overview.python.markdown +++ b/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/overview.python.markdown @@ -178,11 +178,16 @@ Let's play with revisions a little to get a taste of its advantages. ![Revision for Document Modification](images\revisions_modify-document.png "Revision for Document Modification") 5. **Delete the document**. - Though you deleted the document, its **audit trail** is **not lost**: all revisions were moved to the [Revisions Bin](../../studio/database/document-extensions/revisions#revisions-bin), - including a new revision (called "Delete-Revision"), created to indicate that the document was deleted. + Though you deleted the document, its **audit trail** is **not lost**: all its revisions are moved to the [Revisions Bin](../../studio/database/document-extensions/revisions#revisions-bin), + including a new revision (called "Delete Revision"), created to indicate that the document was deleted. - To see the "orphaned" revisions (whose parent document was deleted): - * Open the `Documents > Revisions Bin` section in the Studio + {INFO: } + * A "Delete Revision" is created only if the deleted document has revisions. + * If a document has no revisions, a "Delete Revision" will be created only if the Revisions Configuration is set and enabled for its collection. + {INFO/} + + To see the revisions created for the document before it was deleted: + * Open the `Documents > Revisions Bin` section in the Studio * Click the deleted document's ID ![Revisions Bin](images\revisions_revisions-bin.png "Revisions Bin") diff --git a/Documentation/5.4/Raven.Documentation.Pages/studio/database/document-extensions/revisions.markdown b/Documentation/5.4/Raven.Documentation.Pages/studio/database/document-extensions/revisions.markdown index fa5c9552d3..c49782df44 100644 --- a/Documentation/5.4/Raven.Documentation.Pages/studio/database/document-extensions/revisions.markdown +++ b/Documentation/5.4/Raven.Documentation.Pages/studio/database/document-extensions/revisions.markdown @@ -94,7 +94,7 @@ Click the revision's comparison button to compare it with other revisions: ![Revision Comparison](images/revisions/revision-comparison.png "Revision Comparison") 1. **Exit revisions compare mode** - Click to exit the comparison window and return to the revisions tTab in the Document View. + Click to exit the comparison window and return to the revisions tab in the Document View. 2. **Compare with** Click to select a revision to compare with. ![Compare-with Drop List](images/revisions/compare-with-drop-list.png "Compare-with Drop List") @@ -129,9 +129,8 @@ Click the revision's comparison button to compare it with other revisions: making them irrecoverable. 4. **Deleted document ID** This is the ID of the document that was deleted. - Click it to inspect the revisions created for this document, - known as "orphaned revisions" since their parent document has been deleted. - ![Orphaned Revisions](images/revisions/orphaned-revisions.png "Orphaned Revisions") + Click it to inspect the revisions created for this document. + ![Revisions of a deleted document](images/revisions/orphaned-revisions.png "Revisions of a deleted document") * Revisions stored in the revisions bin can be [inspected](../../../studio/database/document-extensions/revisions#revision-inspection) and cloned just like the revisions of a live document. 5. **Change vector** diff --git a/Documentation/5.4/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.cs b/Documentation/5.4/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.cs index 1f79c1fa48..8ab0deeb5a 100644 --- a/Documentation/5.4/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.cs +++ b/Documentation/5.4/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.cs @@ -30,7 +30,7 @@ public ConfigRevisions() // ------------------------ // * A revision will be created anytime a document is modified or deleted. // * Revisions of a deleted document can be accessed in the Revisions Bin view. - // * At least 100 of the latest revisions will be kept. + // * Only the latest 100 revisions will be kept. Older ones will be discarded. // * Older revisions will be removed if they exceed 7 days on next revision creation. // * A maximum of 15 revisions will be deleted each time a document is updated, // until the defined '# of revisions to keep' limit is reached. @@ -174,7 +174,7 @@ public async Task ConfigRevisionsAsync() // ------------------------ // * A revision will be created anytime a document is modified or deleted. // * Revisions of a deleted document can be accessed in the Revisions Bin view. - // * At least 100 of the latest revisions will be kept. + // * Only the latest 100 revisions will be kept. Older ones will be discarded. // * Older revisions will be removed if they exceed 7 days on next revision creation. // * A maximum of 15 revisions will be deleted each time a document is updated, // until the defined '# of revisions to keep' limit is reached. diff --git a/Documentation/5.4/Samples/nodejs/documentExtensions/revisions/client-api/operations/configureRevisions.js b/Documentation/5.4/Samples/nodejs/documentExtensions/revisions/client-api/operations/configureRevisions.js index 2308f8ad86..7ca11f5595 100644 --- a/Documentation/5.4/Samples/nodejs/documentExtensions/revisions/client-api/operations/configureRevisions.js +++ b/Documentation/5.4/Samples/nodejs/documentExtensions/revisions/client-api/operations/configureRevisions.js @@ -19,7 +19,7 @@ async function configureRevisions() { // ------------------------ // * A revision will be created anytime a document is modified or deleted. // * Revisions of a deleted document can be accessed in the Revisions Bin view. - // * At least 100 of the latest revisions will be kept. + // * Only the latest 100 revisions will be kept. Older ones will be discarded. // * Older revisions will be removed if they exceed 7 days on next revision creation. // * A maximum of 15 revisions will be deleted each time a document is updated, // until the defined '# of revisions to keep' limit is reached. diff --git a/Documentation/5.4/Samples/python/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.py b/Documentation/5.4/Samples/python/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.py index 42a87f494e..f3c182adf5 100644 --- a/Documentation/5.4/Samples/python/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.py +++ b/Documentation/5.4/Samples/python/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.py @@ -29,7 +29,7 @@ def test_configure_revisions(self): # ------------------------ # * A revision will be created anytime a document is modified or deleted. # * Revisions of a deleted document can be accessed in the Revisions Bin view. - # * At least 100 of the latest revisions will be kept. + # * Only the latest 100 revisions will be kept. Older ones will be discarded. # * Older revisions will be removed if they exceed 7 days on next revision creation. # * A maximum of 15 revisions will be deleted each time a document is updated, # until the defined '# of revisions to keep' limit is reached. diff --git a/Documentation/6.0/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.cs b/Documentation/6.0/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.cs index 1f79c1fa48..8ab0deeb5a 100644 --- a/Documentation/6.0/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.cs +++ b/Documentation/6.0/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.cs @@ -30,7 +30,7 @@ public ConfigRevisions() // ------------------------ // * A revision will be created anytime a document is modified or deleted. // * Revisions of a deleted document can be accessed in the Revisions Bin view. - // * At least 100 of the latest revisions will be kept. + // * Only the latest 100 revisions will be kept. Older ones will be discarded. // * Older revisions will be removed if they exceed 7 days on next revision creation. // * A maximum of 15 revisions will be deleted each time a document is updated, // until the defined '# of revisions to keep' limit is reached. @@ -174,7 +174,7 @@ public async Task ConfigRevisionsAsync() // ------------------------ // * A revision will be created anytime a document is modified or deleted. // * Revisions of a deleted document can be accessed in the Revisions Bin view. - // * At least 100 of the latest revisions will be kept. + // * Only the latest 100 revisions will be kept. Older ones will be discarded. // * Older revisions will be removed if they exceed 7 days on next revision creation. // * A maximum of 15 revisions will be deleted each time a document is updated, // until the defined '# of revisions to keep' limit is reached. diff --git a/Documentation/6.0/Samples/nodejs/document-extensions/revisions/client-api/operations/configureRevisions.js b/Documentation/6.0/Samples/nodejs/document-extensions/revisions/client-api/operations/configureRevisions.js index 2308f8ad86..7ca11f5595 100644 --- a/Documentation/6.0/Samples/nodejs/document-extensions/revisions/client-api/operations/configureRevisions.js +++ b/Documentation/6.0/Samples/nodejs/document-extensions/revisions/client-api/operations/configureRevisions.js @@ -19,7 +19,7 @@ async function configureRevisions() { // ------------------------ // * A revision will be created anytime a document is modified or deleted. // * Revisions of a deleted document can be accessed in the Revisions Bin view. - // * At least 100 of the latest revisions will be kept. + // * Only the latest 100 revisions will be kept. Older ones will be discarded. // * Older revisions will be removed if they exceed 7 days on next revision creation. // * A maximum of 15 revisions will be deleted each time a document is updated, // until the defined '# of revisions to keep' limit is reached. diff --git a/Documentation/6.0/Samples/python/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.py b/Documentation/6.0/Samples/python/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.py index 42a87f494e..f3c182adf5 100644 --- a/Documentation/6.0/Samples/python/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.py +++ b/Documentation/6.0/Samples/python/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.py @@ -29,7 +29,7 @@ def test_configure_revisions(self): # ------------------------ # * A revision will be created anytime a document is modified or deleted. # * Revisions of a deleted document can be accessed in the Revisions Bin view. - # * At least 100 of the latest revisions will be kept. + # * Only the latest 100 revisions will be kept. Older ones will be discarded. # * Older revisions will be removed if they exceed 7 days on next revision creation. # * A maximum of 15 revisions will be deleted each time a document is updated, # until the defined '# of revisions to keep' limit is reached. diff --git a/Documentation/6.2/Raven.Documentation.Pages/Raven.Documentation.Pages.csproj b/Documentation/6.2/Raven.Documentation.Pages/Raven.Documentation.Pages.csproj index 552f9b1ee6..65ab1d8db6 100644 --- a/Documentation/6.2/Raven.Documentation.Pages/Raven.Documentation.Pages.csproj +++ b/Documentation/6.2/Raven.Documentation.Pages/Raven.Documentation.Pages.csproj @@ -5,9 +5,9 @@ - - - + + + diff --git a/Documentation/6.2/Raven.Documentation.Pages/client-api/operations/what-are-operations.dotnet.markdown b/Documentation/6.2/Raven.Documentation.Pages/client-api/operations/what-are-operations.dotnet.markdown index 3b150a8f55..87d176bb3c 100644 --- a/Documentation/6.2/Raven.Documentation.Pages/client-api/operations/what-are-operations.dotnet.markdown +++ b/Documentation/6.2/Raven.Documentation.Pages/client-api/operations/what-are-operations.dotnet.markdown @@ -256,6 +256,7 @@ * **Revisions**:        [ConfigureRevisionsOperation](../../document-extensions/revisions/client-api/operations/configure-revisions)        [DeleteRevisionsOperation](../../document-extensions/revisions/client-api/operations/delete-revisions) +        [ConfigureRevisionsBinCleanerOperation](../../document-extensions/revisions/revisions-bin-cleaner#setting-the-revisions-bin-cleaner---from-the-client-api) * **Sorters**:        [PutSortersOperation](../../client-api/operations/maintenance/sorters/put-sorter) diff --git a/Documentation/6.2/Raven.Documentation.Pages/document-extensions/revisions/.docs.json b/Documentation/6.2/Raven.Documentation.Pages/document-extensions/revisions/.docs.json index e51c6bf011..cbb87abf4a 100644 --- a/Documentation/6.2/Raven.Documentation.Pages/document-extensions/revisions/.docs.json +++ b/Documentation/6.2/Raven.Documentation.Pages/document-extensions/revisions/.docs.json @@ -1,94 +1,100 @@ [ - { - "Path": "overview.markdown", - "Name": "Overview", - "DiscussionId": "ed9e00a0-d1bd-4fa4-bb47-585538a29f51", - "Mappings": [ - { - "Version": 5.2, - "Key": "server/extensions/revisions" - }, - { - "Version": 5.1, - "Key": "server/extensions/revisions" - }, - { - "Version": 5.0, - "Key": "server/extensions/revisions" - }, - { - "Version": 4.2, - "Key": "server/extensions/revisions" - }, - { - "Version": 4.1, - "Key": "server/extensions/revisions" - }, - { - "Version": 4.0, - "Key": "server/extensions/revisions" - } - ] - }, - { - "Path": "revert-revisions.markdown", - "Name": "Revert Documents to Revisions", - "DiscussionId": "ed9e00a0-d1bd-4fa4-bb47-585538a29f51", - "Mappings": [ - { - "Version": 5.2, - "Key": "server/extensions/revert-revisions" - }, - { - "Version": 5.1, - "Key": "server/extensions/revert-revisions" - }, - { - "Version": 5.0, - "Key": "server/extensions/revert-revisions" - }, - { - "Version": 4.2, - "Key": "server/extensions/revert-revisions" - } - ] - }, - { - "Path": "/client-api", - "Name": "Client API", - "Mappings": [] - }, - { - "Path": "revisions-and-other-features.markdown", - "Name": "Revisions and Other Features", - "DiscussionId": "68e60b2c-83a2-42dd-b464-9deb18c90e7a", - "Mappings": [ - { - "Version": 5.2, - "Key": "client-api/session/revisions/counter-revisions" - }, - { - "Version": 5.1, - "Key": "client-api/session/revisions/counter-revisions" - }, - { - "Version": 5.0, - "Key": "client-api/session/revisions/counter-revisions" - }, - { - "Version": 4.2, - "Key": "client-api/session/revisions/counter-revisions" - }, - { - "Version": 4.1, - "Key": "client-api/session/revisions/counter-revisions" - } - ] - }, - { - "Path": "troubleshooting.markdown", - "Name": "Troubleshooting", - "DiscussionId": "e60b674f-e129-4426-92c0-84adb33cbe25", - "Mappings": [] - } + { + "Path": "overview.markdown", + "Name": "Overview", + "DiscussionId": "ed9e00a0-d1bd-4fa4-bb47-585538a29f51", + "Mappings": [ + { + "Version": 5.2, + "Key": "server/extensions/revisions" + }, + { + "Version": 5.1, + "Key": "server/extensions/revisions" + }, + { + "Version": 5.0, + "Key": "server/extensions/revisions" + }, + { + "Version": 4.2, + "Key": "server/extensions/revisions" + }, + { + "Version": 4.1, + "Key": "server/extensions/revisions" + }, + { + "Version": 4.0, + "Key": "server/extensions/revisions" + } + ] + }, + { + "Path": "/client-api", + "Name": "Client API", + "Mappings": [] + }, + { + "Path": "revert-revisions.markdown", + "Name": "Revert Documents to Revisions", + "DiscussionId": "ed9e00a0-d1bd-4fa4-bb47-585538a29f51", + "Mappings": [ + { + "Version": 5.2, + "Key": "server/extensions/revert-revisions" + }, + { + "Version": 5.1, + "Key": "server/extensions/revert-revisions" + }, + { + "Version": 5.0, + "Key": "server/extensions/revert-revisions" + }, + { + "Version": 4.2, + "Key": "server/extensions/revert-revisions" + } + ] + }, + { + "Path": "revisions-and-other-features.markdown", + "Name": "Revisions and Other Features", + "DiscussionId": "68e60b2c-83a2-42dd-b464-9deb18c90e7a", + "Mappings": [ + { + "Version": 5.2, + "Key": "client-api/session/revisions/counter-revisions" + }, + { + "Version": 5.1, + "Key": "client-api/session/revisions/counter-revisions" + }, + { + "Version": 5.0, + "Key": "client-api/session/revisions/counter-revisions" + }, + { + "Version": 4.2, + "Key": "client-api/session/revisions/counter-revisions" + }, + { + "Version": 4.1, + "Key": "client-api/session/revisions/counter-revisions" + } + ] + }, + { + "Path": "revisions-bin-cleaner.markdown", + "Name": "Revisions Bin Cleaner", + "DiscussionId": "0acef912-fa39-43b5-9188-7265b1c45608", + "Mappings": [] + }, + { + "Path": "troubleshooting.markdown", + "Name": "Troubleshooting", + "DiscussionId": "e60b674f-e129-4426-92c0-84adb33cbe25", + "Mappings": [] + } ] diff --git a/Documentation/6.2/Raven.Documentation.Pages/document-extensions/revisions/client-api/operations/delete-revisions.dotnet.markdown b/Documentation/6.2/Raven.Documentation.Pages/document-extensions/revisions/client-api/operations/delete-revisions.dotnet.markdown index 46c0c78bad..9c1ac03619 100644 --- a/Documentation/6.2/Raven.Documentation.Pages/document-extensions/revisions/client-api/operations/delete-revisions.dotnet.markdown +++ b/Documentation/6.2/Raven.Documentation.Pages/document-extensions/revisions/client-api/operations/delete-revisions.dotnet.markdown @@ -75,6 +75,22 @@ No exception is thrown if a change vector doesn’t match any revision. {CODE-TAB:csharp:Async delete_revisions_4_async@DocumentExtensions\Revisions\ClientAPI\Operations\DeleteRevisions.cs /} {CODE-TABS/} +{CONTENT-FRAME: } + +Avoid deleting a "Delete Revision" using the `DeleteRevisionsOperation` operation. +Consider the following scenario: + +1. A document that has revisions is deleted. + +2. A "Delete Revision" is created for the document, and it will be listed in the [Revisions Bin](../../../../studio/database/document-extensions/revisions#revisions-bin). + +3. The revisions of this deleted document remain accessible via the Revisions Bin. + +4. If you remove this "Delete Revision" by providing its change vector to `DeleteRevisionsOperation`, + the "Delete Revision" will be removed from the Revisions Bin, causing the associated revisions to become orphaned. + As a result, you will no longer have access to these revisions via the Revisions Bin. + +{CONTENT-FRAME/} {PANEL/} {PANEL: Syntax} diff --git a/Documentation/6.2/Raven.Documentation.Pages/document-extensions/revisions/images/revisions-bin-cleaner.png b/Documentation/6.2/Raven.Documentation.Pages/document-extensions/revisions/images/revisions-bin-cleaner.png new file mode 100644 index 0000000000..b81382b595 Binary files /dev/null and b/Documentation/6.2/Raven.Documentation.Pages/document-extensions/revisions/images/revisions-bin-cleaner.png differ diff --git a/Documentation/6.2/Raven.Documentation.Pages/document-extensions/revisions/revisions-bin-cleaner.markdown b/Documentation/6.2/Raven.Documentation.Pages/document-extensions/revisions/revisions-bin-cleaner.markdown new file mode 100644 index 0000000000..4efcfec425 --- /dev/null +++ b/Documentation/6.2/Raven.Documentation.Pages/document-extensions/revisions/revisions-bin-cleaner.markdown @@ -0,0 +1,104 @@ +# Revisions Bin Cleaner +--- + +{NOTE: } + +* The [Revisions Bin](../../studio/database/document-extensions/revisions#revisions-bin) stores revisions of deleted documents, ensuring they remain accessible. + +* While you can manually delete these revisions directly from the Revisions Bin, + you can also set up a cleaner task to remove them automatically. Learn more below. + +* In this page: + * [The revisions bin cleaner](../../document-extensions/revisions/revisions-bin-cleaner#the-revisions-bin-cleaner) + * [Setting the revisions bin cleaner - from the Studio](../../document-extensions/revisions/revisions-bin-cleaner#setting-the-revisions-bin-cleaner---from-the-studio) + * [Setting the revisions bin cleaner - from the Client API](../../document-extensions/revisions/revisions-bin-cleaner#setting-the-revisions-bin-cleaner---from-the-client-api) + * [Syntax](../../document-extensions/revisions/revisions-bin-cleaner#syntax) + +{NOTE/} + +--- + +{PANEL: The revisions bin cleaner} + +Each entry in the [Revisions Bin](../../studio/database/document-extensions/revisions#revisions-bin) represents a "Delete Revision", +which is a revision that marks a document as deleted and provides access to the revisions that were created for the document before it was deleted. + +{WARNING: } +When the cleaner removes a "Delete Revision" entry, +ALL the revisions associated with the deleted document are **permanently deleted**. +{WARNING/} + +--- + +* The Revisions Bin Cleaner is configured with the following parameters: + * **Frequency** - How often the cleaner runs. + * **Entries age to keep** - The cleaner deletes revision entries older than this value. + +* The cleaner task can be managed from: + * The [Revisions bin cleaner view](../../document-extensions/revisions/revisions-bin-cleaner#setting-the-revisions-bin-cleaner---from-the-studio) in the Studio + * The [Client API](../../document-extensions/revisions/revisions-bin-cleaner#setting-the-revisions-bin-cleaner---from-the-client-api). + +* When working with a secure server: + * Configuring the Revisions Bin Cleaner is logged in the [audit log](../../server/security/audit-log/audit-log). + * Deleting revisions is only available to a client certificate with a security clearance of [Database Admin](../../server/security/authorization/security-clearance-and-permissions#section) or higher. + +{PANEL/} + +{PANEL: Setting the revisions bin cleaner - from the Studio} + +![Revisions bin cleaner view](images/revisions-bin-cleaner.png "Revisions Bin Cleaner View") + +1. Go to **Settings > Revisions Bin Cleaner** +2. Toggle ON to enable the cleaner task. +3. Set the minimum entries age to keep: + * When toggled ON: + * Revisions Bin entries older than this value will be deleted. + * Default: `30` days. + * When toggled OFF: + * ALL Revisions Bin entries will be deleted. +4. Set the custom cleaner frequency: + * Define how often (in seconds) the Revisions Bin Cleaner runs. + * Default: `300` seconds (5 minutes). + +{PANEL/} + +{PANEL: Setting the revisions bin cleaner - from the Client API} + +* Use `ConfigureRevisionsBinCleanerOperation` to configure the Revisions Bin Cleaner from the Client API. + +* By default, the operation will be applied to the [default database](../../client-api/setting-up-default-database). + To operate on a different database see [switch operations to different database](../../client-api/operations/how-to/switch-operations-to-a-different-database). + +* In this example, we enable the cleaner and configure its execution frequency and retention policy. + + {CODE-TABS} + {CODE-TAB:csharp:Sync configure_cleaner@DocumentExtensions\Revisions\ClientAPI\Operations\RevisionsBinCleaner.cs /} + {CODE-TAB:csharp:Async configure_cleaner_async@DocumentExtensions\Revisions\ClientAPI\Operations\RevisionsBinCleaner.cs /} + {CODE-TABS/} + +{PANEL/} + +{PANEL: Syntax} + +{CODE:csharp syntax_1@DocumentExtensions\Revisions\ClientAPI\Operations\RevisionsBinCleaner.cs /} +{CODE:csharp syntax_2@DocumentExtensions\Revisions\ClientAPI\Operations\RevisionsBinCleaner.cs /} + +{PANEL/} + +## Related Articles + +### Document Extensions + +* [Document Revisions Overview](../../document-extensions/revisions/overview) +* [Revisions and Other Features](../../document-extensions/revisions/revisions-and-other-features) + +### Client API + +* [Revisions: API Overview](../../document-extensions/revisions/client-api/overview) +* [Operations: Configuring Revisions](../../document-extensions/revisions/client-api/operations/configure-revisions) +* [Session: Loading Revisions](../../document-extensions/revisions/client-api/session/loading) + +### Studio + +* [Settings: Document Revisions](../../studio/database/settings/document-revisions) +* [Revisions Bin](../../studio/database/document-extensions/revisions#revisions-bin) diff --git a/Documentation/6.2/Raven.Documentation.Pages/server/security/audit-log/audit-log.markdown b/Documentation/6.2/Raven.Documentation.Pages/server/security/audit-log/audit-log.markdown index f77fde2b75..c06da58617 100644 --- a/Documentation/6.2/Raven.Documentation.Pages/server/security/audit-log/audit-log.markdown +++ b/Documentation/6.2/Raven.Documentation.Pages/server/security/audit-log/audit-log.markdown @@ -73,6 +73,7 @@ * **Revisions**: Deleting revisions Modifying revisions settings + Modifying revisions bin cleaner settings * **Ongoing tasks**: Adding or updating an ETL task Adding or updating a Kafka Sink or a RabbitMQ Sink task diff --git a/Documentation/6.2/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/RevisionsBinCleaner.cs b/Documentation/6.2/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/RevisionsBinCleaner.cs new file mode 100644 index 0000000000..efeb51c6f3 --- /dev/null +++ b/Documentation/6.2/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/RevisionsBinCleaner.cs @@ -0,0 +1,85 @@ +using System.Threading.Tasks; +using Raven.Client.Documents; +using Raven.Client.Documents.Operations.Revisions; + +namespace Raven.Documentation.Samples.DocumentExtensions.Revisions.ClientAPI.Operations +{ + public class RevisionsBinCleaner + { + public RevisionsBinCleaner() + { + using (var store = new DocumentStore()) + { + #region configure_cleaner + //Define the revisions bin cleaner configuration + var config = new RevisionsBinConfiguration() + { + // Enable the cleaner + Disabled = false, + + // Set the cleaner execution frequency + CleanerFrequencyInSec = 24 * 60 * 60, // one day (in seconds) + + // Revisions bin entries older than the following value will be deleted + MinimumEntriesAgeToKeepInMin = 24 * 60 // one day (in minutes) + }; + + // Define the operation + var configRevisionsBinCleanerOp = new ConfigureRevisionsBinCleanerOperation(config); + + // Execute the operation by passing it to Maintenance.Send + store.Maintenance.Send(configRevisionsBinCleanerOp); + #endregion + } + } + + public async Task ConfigRevisionsAsync() + { + using (var store = new DocumentStore()) + { + #region configure_cleaner_async + var config = new RevisionsBinConfiguration() + { + Disabled = false, + CleanerFrequencyInSec = 24 * 60 * 60, + MinimumEntriesAgeToKeepInMin = 24 * 60 + }; + + var configRevisionsBinCleanerOp = new ConfigureRevisionsBinCleanerOperation(config); + await store.Maintenance.SendAsync(configRevisionsBinCleanerOp); + #endregion + } + } + + public class Syntax + { + public interface IFoo + { + /* + #region syntax_1 + public ConfigureRevisionsBinCleanerOperation(RevisionsBinConfiguration configuration); + #endregion + */ + } + + #region syntax_2 + public class RevisionsBinConfiguration + { + // Set to true to enable the revisions bin cleaner. + // Default: false (cleaner is disabled). + public bool Disabled { get; set; } + + // The minimum age (in minutes) for revisions-bin entries to be kept in the database. + // The cleaner deletes entries older than this value. + // When set to 0: ALL revisions-bin entries will be removed from the Revisions Bin + // Default: 30 days. + public int MinimumEntriesAgeToKeepInMin { get; set; } + + // The frequency (in seconds) at which the revisions bin cleaner executes. + // Default: 300 seconds (5 minutes). + public long CleanerFrequencyInSec { get; set; } = 5 * 60; + } + #endregion + } + } +} diff --git a/Documentation/6.2/Samples/csharp/Raven.Documentation.Samples/Raven.Documentation.Samples.csproj b/Documentation/6.2/Samples/csharp/Raven.Documentation.Samples/Raven.Documentation.Samples.csproj index abad6bcd17..2a6b0bbe97 100644 --- a/Documentation/6.2/Samples/csharp/Raven.Documentation.Samples/Raven.Documentation.Samples.csproj +++ b/Documentation/6.2/Samples/csharp/Raven.Documentation.Samples/Raven.Documentation.Samples.csproj @@ -8,9 +8,9 @@ - - - + + + diff --git a/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/.docs.json b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/.docs.json index e51c6bf011..cbb87abf4a 100644 --- a/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/.docs.json +++ b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/.docs.json @@ -1,94 +1,100 @@ [ - { - "Path": "overview.markdown", - "Name": "Overview", - "DiscussionId": "ed9e00a0-d1bd-4fa4-bb47-585538a29f51", - "Mappings": [ - { - "Version": 5.2, - "Key": "server/extensions/revisions" - }, - { - "Version": 5.1, - "Key": "server/extensions/revisions" - }, - { - "Version": 5.0, - "Key": "server/extensions/revisions" - }, - { - "Version": 4.2, - "Key": "server/extensions/revisions" - }, - { - "Version": 4.1, - "Key": "server/extensions/revisions" - }, - { - "Version": 4.0, - "Key": "server/extensions/revisions" - } - ] - }, - { - "Path": "revert-revisions.markdown", - "Name": "Revert Documents to Revisions", - "DiscussionId": "ed9e00a0-d1bd-4fa4-bb47-585538a29f51", - "Mappings": [ - { - "Version": 5.2, - "Key": "server/extensions/revert-revisions" - }, - { - "Version": 5.1, - "Key": "server/extensions/revert-revisions" - }, - { - "Version": 5.0, - "Key": "server/extensions/revert-revisions" - }, - { - "Version": 4.2, - "Key": "server/extensions/revert-revisions" - } - ] - }, - { - "Path": "/client-api", - "Name": "Client API", - "Mappings": [] - }, - { - "Path": "revisions-and-other-features.markdown", - "Name": "Revisions and Other Features", - "DiscussionId": "68e60b2c-83a2-42dd-b464-9deb18c90e7a", - "Mappings": [ - { - "Version": 5.2, - "Key": "client-api/session/revisions/counter-revisions" - }, - { - "Version": 5.1, - "Key": "client-api/session/revisions/counter-revisions" - }, - { - "Version": 5.0, - "Key": "client-api/session/revisions/counter-revisions" - }, - { - "Version": 4.2, - "Key": "client-api/session/revisions/counter-revisions" - }, - { - "Version": 4.1, - "Key": "client-api/session/revisions/counter-revisions" - } - ] - }, - { - "Path": "troubleshooting.markdown", - "Name": "Troubleshooting", - "DiscussionId": "e60b674f-e129-4426-92c0-84adb33cbe25", - "Mappings": [] - } + { + "Path": "overview.markdown", + "Name": "Overview", + "DiscussionId": "ed9e00a0-d1bd-4fa4-bb47-585538a29f51", + "Mappings": [ + { + "Version": 5.2, + "Key": "server/extensions/revisions" + }, + { + "Version": 5.1, + "Key": "server/extensions/revisions" + }, + { + "Version": 5.0, + "Key": "server/extensions/revisions" + }, + { + "Version": 4.2, + "Key": "server/extensions/revisions" + }, + { + "Version": 4.1, + "Key": "server/extensions/revisions" + }, + { + "Version": 4.0, + "Key": "server/extensions/revisions" + } + ] + }, + { + "Path": "/client-api", + "Name": "Client API", + "Mappings": [] + }, + { + "Path": "revert-revisions.markdown", + "Name": "Revert Documents to Revisions", + "DiscussionId": "ed9e00a0-d1bd-4fa4-bb47-585538a29f51", + "Mappings": [ + { + "Version": 5.2, + "Key": "server/extensions/revert-revisions" + }, + { + "Version": 5.1, + "Key": "server/extensions/revert-revisions" + }, + { + "Version": 5.0, + "Key": "server/extensions/revert-revisions" + }, + { + "Version": 4.2, + "Key": "server/extensions/revert-revisions" + } + ] + }, + { + "Path": "revisions-and-other-features.markdown", + "Name": "Revisions and Other Features", + "DiscussionId": "68e60b2c-83a2-42dd-b464-9deb18c90e7a", + "Mappings": [ + { + "Version": 5.2, + "Key": "client-api/session/revisions/counter-revisions" + }, + { + "Version": 5.1, + "Key": "client-api/session/revisions/counter-revisions" + }, + { + "Version": 5.0, + "Key": "client-api/session/revisions/counter-revisions" + }, + { + "Version": 4.2, + "Key": "client-api/session/revisions/counter-revisions" + }, + { + "Version": 4.1, + "Key": "client-api/session/revisions/counter-revisions" + } + ] + }, + { + "Path": "revisions-bin-cleaner.markdown", + "Name": "Revisions Bin Cleaner", + "DiscussionId": "0acef912-fa39-43b5-9188-7265b1c45608", + "Mappings": [] + }, + { + "Path": "troubleshooting.markdown", + "Name": "Troubleshooting", + "DiscussionId": "e60b674f-e129-4426-92c0-84adb33cbe25", + "Mappings": [] + } ] diff --git a/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/client-api/operations/configure-revisions.dotnet.markdown b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/client-api/operations/configure-revisions.dotnet.markdown new file mode 100644 index 0000000000..73f100c33b --- /dev/null +++ b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/client-api/operations/configure-revisions.dotnet.markdown @@ -0,0 +1,107 @@ +# Configure Revisions Operation + +--- + +{NOTE: } + +* Use `ConfigureRevisionsOperation` to apply the following [revisions configuration](../../../../studio/database/settings/document-revisions#revisions-configuration) to the database: + * **Default configuration** - applies to all document collections. + * **Collection-specific configurations** - override the default settings for these collections. + * To apply a configuration for conflict document revisions see [configure conflict revisions](../../../../document-extensions/revisions/client-api/operations/conflict-revisions-configuration). + +* The configuration passed to this operation will **REPLACE** the current revisions configuration in the database. + To **MODIFY** existing configuration, fetch the current configuration from the database record first. + +* After applying the configuration, + revisions are created and purged for a document whenever the document is created, modified, or deleted. + +* To create a revision when there is no configuration defined (or enabled) see: [force revision creation](../../../../document-extensions/revisions/overview#force-revision-creation) + +* By default, the operation will be applied to the [default database](../../../../client-api/setting-up-default-database). + To operate on a different database see [switch operations to different database](../../../../client-api/operations/how-to/switch-operations-to-a-different-database). + +* In this page: + * [Replace configuration](../../../../document-extensions/revisions/client-api/operations/configure-revisions#replace-configuration) + * [Modify configuration](../../../../document-extensions/revisions/client-api/operations/configure-revisions#modify-configuration) + * [Syntax](../../../../document-extensions/revisions/client-api/operations/configure-revisions#syntax) + +{NOTE/} + +--- + +{PANEL: Replace configuration} + +* In this example, we create a new `RevisionsConfiguration` for the database. + If revisions configuration already exists in the database - it will be **replaced**. + +{CODE-TABS} +{CODE-TAB:csharp:Sync replace_configuration@DocumentExtensions\Revisions\ClientAPI\Operations\ConfigureRevisions.cs /} +{CODE-TAB:csharp:Async replace_configuration_async@DocumentExtensions\Revisions\ClientAPI\Operations\ConfigureRevisions.cs /} +{CODE-TABS/} + +{PANEL/} + +{PANEL: Modify configuration} + +* In this example, we fetch the existing revisions configuration from the database record and **modify** it. + +{CODE-TABS} +{CODE-TAB:csharp:Sync modify_configuration@DocumentExtensions\Revisions\ClientAPI\Operations\ConfigureRevisions.cs /} +{CODE-TAB:csharp:Async modify_configuration_async@DocumentExtensions\Revisions\ClientAPI\Operations\ConfigureRevisions.cs /} +{CODE-TABS/} + +{PANEL/} + +{PANEL: Syntax} + +{CODE:csharp syntax_1@DocumentExtensions\Revisions\ClientAPI\Operations\ConfigureRevisions.cs /} + +| Parameter | Type | Description | +| - | - | - | +| **configuration** | `RevisionsConfiguration` | The revisions configuration to apply | + +{CODE:csharp syntax_2@DocumentExtensions\Revisions\ClientAPI\Operations\ConfigureRevisions.cs /} + +| Property | Type | Description | +| - | - | - | +| **Default** | `RevisionsCollectionConfiguration` | Optional default settings that apply to any collection Not specified in `Collections`. | +| **Collections** | `Dictionary` | A Dictionary of collection-specific configurations
The `keys` are the collection names
The `values` are the corresponding configurations.
Overrides the default settings for the collections defined. | + +{CODE:csharp syntax_3@DocumentExtensions\Revisions\ClientAPI\Operations\ConfigureRevisions.cs /} + + + +| Property | Type | Description | +| - | - |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **MinimumRevisionsToKeep** | `long` |
  • This number of revisions will be kept per document.
  • Older revisions exceeding this number will be purged upon the next document modification.
  • **Default** : `null` = no limit
| +| **MinimumRevisionAgeToKeep** | `TimeSpan` |