RDoc-3911 Enforce Revisions Configuration & MaxOpsPerSecond throttling#2530
Merged
ppekrol merged 5 commits intoJun 23, 2026
Merged
Conversation
|
Java file looks perfect! :) |
LielNagar
approved these changes
Jun 22, 2026
haludi
reviewed
Jun 22, 2026
| Operation operation = await store.Operations.SendAsync(enforceConfigurationOp); | ||
|
|
||
| // Wait for the operation to complete and get its result | ||
| var result = (EnforceConfigurationResult)await operation.WaitForCompletionAsync(TimeSpan.FromSeconds(30)); |
There was a problem hiding this comment.
Minor but I think it is cleaner to use the generic version:
var result = await operation.WaitForCompletionAsync<EnforceConfigurationResult>(TimeSpan.FromSeconds(30));
| | **IncludeForceCreated** | `bool` | `true` - [Force-created revisions](../../../../../document-extensions/revisions/overview.mdx#force-revision-creation) may also be removed by the operation.<br/>`false` (default) - Force-created revisions are not included in deletion paths that protect them. | | ||
| | **MaxOpsPerSecond** | `int?` | Limits the number of documents processed per second.<br/>`null` (default) - no throttling.<br/>Must be greater than `0`, otherwise an `InvalidOperationException` is thrown. | | ||
| | **Collections** | `string[]` | The collections the operation applies to.<br/>`null` or empty array - the operation applies to all collections. | | ||
| | **ContinuationParameters** | `RevisionsOperationContinuationParameters` | Optional state used to resume a previous revisions operation.<br/>Populate it from the previous result's `LastProcessedEtags`, `EtagBarriersUsed`, and `NodeTags`. | |
There was a problem hiding this comment.
- If the previous operation ended without issue, why do I need to resume it?
- If the previous operation failed, how can I get the last ETag for it?
The result is not useful in either case.
There was a problem hiding this comment.
IIRC you get that in the progress result
Member
Author
There was a problem hiding this comment.
- Modified the text below to:
=>
`ContinuationParameters` is only needed when resuming an **interrupted** run (e.g. server restart, timeout, or a cancelled long-running operation).
A run that completed successfully does not need to be resumed.
Because an interrupted run does not return a final result,
capture the continuation values from the operation's **progress** while it runs:
* Subscribe to `Operation.OnProgressChanged` and keep the latest `EnforceConfigurationResult` value.
* `EnforceConfigurationResult` is reported as progress and carries `LastProcessedEtags`, `EtagBarriersUsed`, and `NodeTags`.
Because etags are node-local, a resumed operation must run on the same node that produced them.
Keep the `NodeTags` values from the progress result;
they identify the node that produced the continuation values, and the server validates them on resume.
- Created a dedicated issue to describe this in general:
https://issues.hibernatingrhinos.com/issue/RDoc-3948/Track-operation-progress
Member
Author
There was a problem hiding this comment.
@haludi
I have added a new section: "Resume an interrupted operation"
See the latest commit.
M4xymm
approved these changes
Jun 23, 2026
haludi
approved these changes
Jun 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue link
https://issues.hibernatingrhinos.com/issue/RDoc-3911/Enforce-Revisions-Configuration-Document-MaxOpsPerSecond-throttling
Additional description
Studio:
Updated section: Enforce Configuration
Client API:
Created article:
../document-extensions/revisions/client-api/operations/enforce-revisions-configuration.mdx(C#, Java, Node.js)
Python doesn't support this yet
@haludi pls review
docs/document-extensions/revisions/client-api/operations/content/_enforce-revisions-configuration-csharp.mdx@M4xymm pls review
docs/document-extensions/revisions/client-api/operations/content/_enforce-revisions-configuration-nodejs.mdx@LielNagar pls review
docs/document-extensions/revisions/client-api/operations/content/_enforce-revisions-configuration-java.mdxType of change
/templatesor readme)Changes in docs URLs
/scripts/redirects.jsonfile, setDocuments MovedPR label)Changes in UX/UI