Repository navigation
RDoc-3732 - data subscription reorganization - #2484
Conversation
dcfd106 to
08fd80a
Compare
08fd80a to
5bae7c5
Compare
| import CreatingSubscriptionApiNodejs from './content/_creating-subscription_api-nodejs.mdx'; | ||
| import CreatingSubscriptionApiPython from './content/_creating-subscription_api-python.mdx'; | ||
|
|
||
| export const supportedLanguages = ["csharp", "nodejs", "python"]; |
There was a problem hiding this comment.
Issue: This page shows an empty body to a reader whose selected language is not in this list, because the languages are declared only here and not as supported_languages frontmatter.
src/theme/DocItem/index.tsx:26-33 reads only frontMatter.supported_languages. Without it, useLanguage() never falls back to a language the page has (src/components/LanguageStore.tsx:47-52), so every <LanguageContent> renders nothing. For example, open this page with ?lang=java, or after choosing PHP on another page. The sticky language bar (DocsTopbar) is also hidden.
Fix: add supported_languages: ["csharp", "nodejs", "python"] to the frontmatter and pass frontMatter.supported_languages to LanguageSwitcher, as the pre-PR page did.
There was a problem hiding this comment.
Fixed: the language list is now in the supported_languages frontmatter, and LanguageSwitcher takes frontMatter.supported_languages. The same fix is applied to the other four data subscriptions pages.
| import ConsumingSubscriptionNodejs from './content/_consuming-subscription-nodejs.mdx'; | ||
| import ConsumingSubscriptionPython from './content/_consuming-subscription-python.mdx'; | ||
|
|
||
| export const supportedLanguages = ["csharp", "java", "nodejs", "python"]; |
There was a problem hiding this comment.
Issue: This page shows an empty body to a reader whose selected language is not in this list (e.g., PHP), because the languages are declared only here and not as supported_languages frontmatter. See the comment on creating-subscription_api.mdx:15. Fix: add supported_languages to the frontmatter and pass frontMatter.supported_languages.
There was a problem hiding this comment.
Fixed, as on creating-subscription_api.mdx.
| import ConcurrentSubscriptionsJava from './content/_concurrent-subscriptions-java.mdx'; | ||
| import ConcurrentSubscriptionsNodejs from './content/_concurrent-subscriptions-nodejs.mdx'; | ||
|
|
||
| export const supportedLanguages = ["csharp", "java", "nodejs"]; |
There was a problem hiding this comment.
Issue: This page shows an empty body to a reader whose selected language is not in this list (e.g., Python), because the languages are declared only here and not as supported_languages frontmatter. See the comment on creating-subscription_api.mdx:15. Fix: add supported_languages to the frontmatter and pass frontMatter.supported_languages.
There was a problem hiding this comment.
Fixed, as on creating-subscription_api.mdx.
| import RevisionsSupportJava from './content/_revisions-support-java.mdx'; | ||
| import RevisionsSupportNodejs from './content/_revisions-support-nodejs.mdx'; | ||
|
|
||
| export const supportedLanguages = ["csharp", "java", "nodejs"]; |
There was a problem hiding this comment.
Issue: This page shows an empty body to a reader whose selected language is not in this list (e.g., Python), because the languages are declared only here and not as supported_languages frontmatter. See the comment on creating-subscription_api.mdx:15. Fix: add supported_languages to the frontmatter and pass frontMatter.supported_languages.
There was a problem hiding this comment.
Fixed, as on creating-subscription_api.mdx.
| import MaintenanceOperationsJava from './content/_maintenance-operations-java.mdx'; | ||
| import MaintenanceOperationsNodejs from './content/_maintenance-operations-nodejs.mdx'; | ||
|
|
||
| export const supportedLanguages = ["csharp", "java", "nodejs"]; |
There was a problem hiding this comment.
Issue: This page shows an empty body to a reader whose selected language is not in this list (e.g., Python), because the languages are declared only here and not as supported_languages frontmatter. See the comment on creating-subscription_api.mdx:15. Fix: add supported_languages to the frontmatter and pass frontMatter.supported_languages.
There was a problem hiding this comment.
Fixed, as on creating-subscription_api.mdx.
| @@ -96,7 +96,7 @@ A generic version of the subscription creation options object. | |||
| | **Filter** | `Expression<Func<T, bool>>` | Lambda expression defining the filter logic for the subscription. Will be translated to a JavaScript function. | | |||
| | **Projection** | `Expression<Func<T, object>>` | Lambda expression defining the projection that will be sent by the subscription for each matching document. Will be translated to a JavaScript function. | | |||
| | **Includes** | `Action<ISubscriptionIncludeBuilder<T>>` | An action that defines include clauses for the subscription. [Included documents](../../../../client-api/data-subscriptions/creation/examples.mdx#create-subscription---include-documents) and/or [included counters](../../../../client-api/data-subscriptions/creation/examples.mdx#create-subscription---include-counters) will be part of the batch sent by the subscription. Include methods can be chained. | | |||
| | **ChangeVector** | `string` | Allows to define a change vector from which the subscription will start processing. Useful for ad-hoc processes that need to process only recent changes. In such cases, you can set the field to _"LastDocument"_ to start processing from the latest document in the collection. | | |||
| | **ChangeVector** | `string` | Allows to define a change vector from which the subscription will start processing. Useful for ad-hoc processes that need to process only recent changes. In such cases, you can set the field to _"LastDocument"_ to send only documents created or modified after the subscription's creation. | | |||
| | **MentorNode** | `string` | Allows to define a specific node in the cluster to handle the subscription. Useful when you prefer a specific server due to its stronger hardware, closer geographic proximity to clients, or other reasons. | | |||
There was a problem hiding this comment.
Issue: ArchivedDataProcessingBehavior has no row in this table, nor in the SubscriptionCreationOptions table (:108-113), although the code block above lists it and the new 6.2 configuration page links here. It exists in 6.2 (SubscriptionCriteria.cs:26, :40, v6.2). RDoc-2977 (commit fe55be094 says the 6.2 creation API was covered). Add the row to both tables.
There was a problem hiding this comment.
Added the ArchivedDataProcessingBehavior row to both tables, SubscriptionCreationOptions and SubscriptionCreationOptions. Verified in the 6.2 client source.
| @@ -72,7 +72,7 @@ Examples for creating subscriptions are available [here](../../../../client-api/ | |||
| | **name** | `string` | User defined name for the subscription.<br/>The name must be unique in the database. | | |||
| | **query** | `string` | RQL query that defines the subscription. This RQL comes with additional support to JavaScript functions inside the `where` clause and special semantics for subscriptions on documents revisions.<br/>Learn more in [subscription RQL](../../../../client-api/data-subscriptions/creation/api-overview.mdx#subscription-rql). | | |||
| | **includes** | `(builder) => void` | A function that accepts a builder object, which allows you to include related documents, counters, and time series in the batch that is sent to the client.<br/>See [Include methods](../../../../client-api/data-subscriptions/creation/api-overview.mdx#include-methods). | | |||
| | **changeVector** | `string` | Allows to define a change vector from which the subscription will start processing. Useful for ad-hoc processes that need to process only recent changes. In such cases, you can set the field to _"LastDocument"_ to start processing from the latest document in the collection. | | |||
| | **changeVector** | `string` | Allows to define a change vector from which the subscription will start processing. Useful for ad-hoc processes that need to process only recent changes. In such cases, you can set the field to _"LastDocument"_ to send only documents created or modified after the subscription's creation. | | |||
| | **mentorNode** | `string` | Allows to define a specific node in the cluster to handle the subscription. Useful when you prefer a specific server due to its stronger hardware, closer geographic proximity to clients, or other reasons. | | |||
| | **pinToMentorNode** | `boolean` | `true` - task will only be handled by the specified mentor node.<br/>`false` - When the specified mentor node is down, the cluster selects another node from the Database Group to handle the task.<br/>Learn more in [pinning a task](../../../../server/clustering/distribution/highly-available-tasks.mdx#pinning-a-task). | | |||
| | **disabled** | `boolean` | `true` - the created subscription will be in a disabled state.<br/>`false` (default) - the created subscription will be enabled. | | |||
There was a problem hiding this comment.
Issue: Node.js 6.2 has no archivedDataProcessingBehavior anywhere on this page: not in the options code block (:56-65), not in this table. The Node.js client has it (SubscriptionCreationOptions.ts:12, nodejs-client v6.0: "ExcludeArchived", "IncludeArchived", "ArchivedOnly"). RDoc-2977. Add the field, the row and the update note, as the C# page has.
There was a problem hiding this comment.
Added archivedDataProcessingBehavior to the options code block and the options table, and the "Archived documents" note after the update options table. The property exists from Node.js client 6.0.0. Tested with server 6.2.4 and Node.js client 6.0.1: each value is stored on the subscription, and update keeps the original value.
| * The RQL `in` operator, e.g., `o.Company in ('companies/1-A', 'companies/2-A')` | ||
| * The RQL methods `startsWith`, `endsWith`, `regex`, `exists`, and `intersect` | ||
| * Plain JavaScript expressions and declared function calls, allowing to perform complex filtering logic | ||
|
|
||
| The subscriptions RQL does not support any of the known RQL searching keywords. |
There was a problem hiding this comment.
Issue: RDoc-3000 item 2 asks to remove this exact sentence ("You cannot just write a sentence such as: 'The subscriptions RQL does not support any of the known RQL searching keywords'"). It now also reads as contradicting the bullet the PR added at :194 (startsWith, endsWith, regex...). Replace it with the methods that are not supported: search, boost, lucene, exact, spatial methods and moreLikeThis (JavascriptCodeQueryVisitor.cs:13-16, :180-184, v6.2).
There was a problem hiding this comment.
Done, here and in the 7.0 and 7.1 versions (where vector.search is listed too).
Added moreLikeThis and vector.search to the 7.2 "Unsupported RQL features" list.
| * The RQL `in` operator, e.g., `o.Company in ('companies/1-A', 'companies/2-A')` | ||
| * The RQL methods `startsWith`, `endsWith`, `regex`, `exists`, and `intersect` | ||
| * Plain JavaScript expressions and declared function calls, allowing to perform complex filtering logic | ||
|
|
||
| The subscriptions RQL does not support any of the known RQL searching keywords. |
There was a problem hiding this comment.
Issue: RDoc-3000 item 2 asks to remove this sentence ("does not support any of the known RQL searching keywords"); it reads as contradicting the bullet above it. Name the unsupported methods instead (see the C# comment at :197).
There was a problem hiding this comment.
Done, as in the C# version.
| * The RQL `in` operator, e.g., `o.Company in ('companies/1-A', 'companies/2-A')` | ||
| * The RQL methods `startsWith`, `endsWith`, `regex`, `exists`, and `intersect` | ||
| * Plain JavaScript expressions and declared function calls, allowing to perform complex filtering logic | ||
|
|
||
| The subscriptions RQL does not support any of the known RQL searching keywords. |
There was a problem hiding this comment.
Issue: RDoc-3000 item 2 asks to remove this sentence ("does not support any of the known RQL searching keywords"); it reads as contradicting the bullet above it. Name the unsupported methods instead (see the C# comment at :197).
There was a problem hiding this comment.
Done, as in the C# version.
…ubscriptions/creating-subscription/creating-subscription_api section
…n the worker reconnects and when it stops, document reconnect events and timeouts
…and established-connection event in /data-subscriptions/consuming-subscription
…s ID from `creating-subscription_api` (6.2-7.2; C#, python, Node.js)
…ption api-overview events tables (6.2-7.1; C#, Node.js, Python, Java) and fix event types in consuming-subscription (7.2; C#, Python, Node.js)
…n` (7.2; C#) and `how-to-consume-data-subscription` (6.2-7.1; C#, Java, Node.js, Python), explain the connection timeout and link the worker events
…tion limits; fix the worker's node-failover and AfterAcknowledgment descriptions. consuming-subscription: 7.2 (C#, Java, Node.js, Python) | consumption/api-overview: 6.2 (C#), 7.0 (C#, Node.js, Python), 7.1 (C#, Java, Node.js, Python)
…es (Python includes, C# async, creation parts, worker retry loops) consuming-subscription: 7.2 (C#, Java, Python) | consumption/examples: 6.2 (C#, Node.js, Python), 7.0 (C#, Node.js, Python), 7.1 (C#, Java, Node.js, Python)
…onsumption examples Added to: 7.2 consuming-subscription (Java, Node.js) | 7.0 consumption/examples (Node.js) | 7.1 consumption/examples (Java, Node.js)
…ion_api (C#, Node, Python): starting point, query support, include syntax. 7.2 creating-subscription_studio: starting-point callouts. 6.2, 7.0, 7.1 creation/api-overview (C#, Node, Python): update LastDocument, keywords, where clause
7.2 (C#, Java, Node.js, Python): creation API, Studio, configuration, overview, maintenance, revisions 6.2-7.1 (C#, Java, Node.js): creation API, server configuration, maintenance, revisions
…c worker's connection. 7.2 maintenance-operations (C#, Java, Node.js): "Dropping connections" frames, at-least-once note 7.2 consuming-subscription, concurrent-subscriptions, monitoring: links to the renamed section
…ies includes, projections with includes, and compare-exchange values in subscription queries; replace failing Python counter-include builder samples with RQL creating-subscription_api: 7.2 (C#, Node.js, Python) | creation/examples: 6.2, 7.0, 7.1 (Python)
… subscriptions projections. 7.2 creating-subscription_api (C#): projecting into a class or record, record example. 7.2 creating-subscription_api (C#, Node.js, Python): Projections panel
…eduled delivery using @refresh, and item metadata in the worker. Fix item metadata rows and Python member names in the 6.2-7.1 api-overview pages.
…s `Update`, checking if a subscription exists, reprocessing after restarts (FAQ). Fix usage example: create subscription once & connecting the worker by the subscription's name (7.2 overview, 6.2-7.1 what-are-data-subscriptions (C#)).
…on's metadata in revisions support, add Java filtering and Java/Node.js syntax, and link the new metadata Panel from the consuming page. Fix the projection example in the 6.2-7.1 Java subscription-with-revisioning pages.
Add a Java tab to the concurrent-subscriptions page and a "Dropping a specific worker's connection" frame to the Java maintenance-operations tab.
…ns page, and document that on a sharded database all subscriptions handle archived documents as set by the configuration key. Add ShardingState to the subscription state tables, and update the sharding subscriptions page in 6.2-7.1.
a3f3d53 to
22dd156
Compare
22dd156 to
dfd48a4
Compare
…mples, revision deletions, include builder, update via change vector, Node.js error event, Python worker options, unsupported RQL methods Fix the 6.2-7.1 creation and consumption pages: stop lists, Python ShippedAt, ArchivedDataProcessingBehavior (6.2), unsupported RQL methods
… page; linked existing pages to the new page; projected item metadata via rawMetadata; Updating a subscription pointer
| @@ -168,7 +168,7 @@ subscription_worker = store.subscriptions.get_subscription_worker_by_name(subscr | |||
|
|
|||
| def _raise_notification_callback(batch: SubscriptionBatch[Order]): | |||
| for item in batch.items: | |||
| raise_notification(item.result.dynamic_field_1) | |||
| raise_notification(item.result.dynamic_field) | |||
There was a problem hiding this comment.
Issue (High): item.result.dynamic_field raises AttributeError. The worker at :167 is created without object_type, so item.result is a dict, not an object.
Evidence: with no type, convert_to_entity_by_key returns the raw document (ravendb/documents/session/entity_to_json.py:118-119, Python client v5.2).
Fix: raise_notification(item.result["dynamic_field"]), as in 7.2 (docs/data-subscriptions/content/_consuming-subscription-python.mdx:418).
Priority: High. The sample fails on its first item.
There was a problem hiding this comment.
Fixed: the sample now reads the field as item.result["dynamic_field"], and the callback no longer declares SubscriptionBatch[Order], since the items are dicts.
Fixed the same sample in 7.0 and 7.1.
Tested with server 6.2.4 and Python client 5.2.6, server 7.0.2 and Python client 7.0.2.post1, and server 7.1.5 and Python client 7.1.5.
There was a problem hiding this comment.
Issue (High): The Java API overview lists the buffer options under their C# names, sendBufferSizeInBytes and receiveBufferSizeInBytes. The Java options are sendBufferSize and receiveBufferSize (setSendBufferSize, setReceiveBufferSize), so code written from the table doesn't compile.
File: versioned_docs/version-6.2/client-api/data-subscriptions/consumption/content/_api-overview-java.mdx:69-70. That file isn't in this PR, so GitHub can't take a comment on it. This comment sits on its C# counterpart.
Evidence: src/main/java/net/ravendb/client/documents/subscriptions/SubscriptionWorkerOptions.java:21-22, :158, :174 (Java client v6.0).
Fix: rename the rows, as in 7.2 (docs/data-subscriptions/content/_consuming-subscription-java.mdx:770-771).
Priority: High. Code written from this table fails to compile.
There was a problem hiding this comment.
Fixed in the Java version of the 6.2 consumption API overview: the rows are now sendBufferSize and receiveBufferSize.
Also fixed the receive buffer's default, which the table gave as 4096: the Java client sets both buffers to 32 KiB.
Fixed the same rows in 7.0 and 7.1.
Verified in the Java client source (v6.0 and v7.1).
There was a problem hiding this comment.
Issue (Blocker): The "Client with full exception handling and processing retries" sample never processes a document. run() returns a Future at once, so the try block ends right away, finally closes the worker, and while True creates and closes a new worker forever. Exceptions from the batch callback never reach the except block.
Line: versioned_docs/version-6.2/client-api/data-subscriptions/consumption/content/_examples-python.mdx:57
Evidence: run returns the worker's future without waiting for it (ravendb/documents/subscriptions/worker.py:262-273, Python client v5.2).
Fix: subscription_worker.run(_process_documents_callback).result(), as in 7.2 (docs/data-subscriptions/content/_consuming-subscription-python.mdx:297).
Priority: Blocker. This is the page's main sample, and it fails without any error.
There was a problem hiding this comment.
Fixed: the sample now calls .result() on the future that run returns, so it waits until processing ends, and exceptions from the batch callback reach the except block.
Tested with server 6.2.4 and Python client 5.2.6: the sample processes the documents, raises the SubscriberErrorException for an order of companies/2-A, and ends after an admin drops the connection.
There was a problem hiding this comment.
Issue (High): The "Client with full exception handling and processing retries" sample uses return at module level (the while True: loop is not inside a function), so Python raises SyntaxError: 'return' outside function.
Lines: versioned_docs/version-6.2/client-api/data-subscriptions/consumption/content/_examples-python.mdx:72, :87
Fix: use break, as in 7.2 (docs/data-subscriptions/content/_consuming-subscription-python.mdx:317, :329).
Priority: High. The sample does not run as written, but the error shows at once.
There was a problem hiding this comment.
Fixed: replaced the three module-level return statements with break.
Fixed the same return statements in 7.0 and 7.1, whose samples now match the 6.2 sample.
Tested with server 6.2.4 and Python client 5.2.6, server 7.0.2 and Python client 7.0.2.post1, and server 7.1.5 and Python client 7.1.5.
There was a problem hiding this comment.
Issue (High): if e is SubscriptionInUseException compares the exception object with the class, so it is always False. When another worker holds the subscription, the sample stops instead of retrying.
Line: versioned_docs/version-6.2/client-api/data-subscriptions/consumption/content/_examples-python.mdx:84
Fix: if exception_type is SubscriptionInUseException: (the sample already sets exception_type = type(e) at :61), as in 7.2 (docs/data-subscriptions/content/_consuming-subscription-python.mdx:326).
Priority: High. The retry branch that the sample's comment describes never runs.
There was a problem hiding this comment.
Fixed: the check is now if exception_type is SubscriptionInUseException:.
Tested with server 6.2.4 and Python client 5.2.6: while another worker holds the subscription, the sample retries until that worker releases it.
There was a problem hiding this comment.
Issue (High): The two buffer options are listed as send_buffer_size_in_bytes and receive_buffer_size_in_bytes, but the Python names are send_buffer_size and receive_buffer_size. Passing the documented names raises TypeError.
Lines: versioned_docs/version-6.2/client-api/data-subscriptions/consumption/content/_api-overview-python.mdx:64-65
Evidence: SubscriptionWorkerOptions.__init__ (ravendb/documents/subscriptions/options.py:48-49, Python client v5.2).
Fix: rename the rows, as in 7.2 (docs/data-subscriptions/content/_consuming-subscription-python.mdx:702-703).
Priority: High. Code written from this table fails.
There was a problem hiding this comment.
Fixed: the rows are now send_buffer_size and receive_buffer_size.
Also fixed the receive buffer's default, which the table gave as 4096: the Python client sets both buffers to 32 KiB.
Fixed the same rows in 7.0 and 7.1.
Tested with Python clients 5.2.6, 7.0.2.post1 and 7.1.5: the documented names raise TypeError, and the corrected names are accepted.
There was a problem hiding this comment.
Issue (High): The on_unexpected_subscription_error box names a list the worker never reads, so a handler appended to it never runs. Handlers must be registered with add_on_unexpected_subscription_error.
Lines: versioned_docs/version-6.2/client-api/data-subscriptions/consumption/content/_how-to-consume-data-subscription-python.mdx:114-121
Evidence: self.on_unexpected_subscription_error = [] is never used (ravendb/documents/subscriptions/worker.py:176). The worker calls only the handlers stored by add_on_unexpected_subscription_error (:226-227, :232-234). Python client v5.2.
Fix: name the method in the box's title and text, as in 7.2 (docs/data-subscriptions/content/_consuming-subscription-python.mdx:152-176).
Priority: High. Code that follows this box fails silently.
There was a problem hiding this comment.
Fixed: the box now names the add_on_unexpected_subscription_error method, and explains when the worker calls the handler and what the worker does next.
Fixed the same box in 7.0 and 7.1.
Tested with server 6.2.4 and Python client 5.2.6: while the server was down, a handler appended to the list was never called, and a handler registered with the method was called for each failed connection attempt.
There was a problem hiding this comment.
Issue (Blocker): In "Subscription that ends when no documents left", catch (SubscriptionClosedException e) never runs. run returns a CompletableFuture at once, so the try block ends before any document is processed, and the exception completes the future, where nothing reads it.
Lines: versioned_docs/version-6.2/client-api/data-subscriptions/consumption/content/_examples-java.mdx:131-139
Evidence: public CompletableFuture<Void> run(...) (src/main/java/net/ravendb/client/documents/subscriptions/AbstractSubscriptionWorker.java:158, Java client v6.0).
Fix: call .get() on the future and unwrap the cause before checking its type, as in 7.2 (docs/data-subscriptions/content/_consuming-subscription-java.mdx:562-575).
Priority: Blocker. The sample exists to wait until every document is processed, and it returns at once without any error.
There was a problem hiding this comment.
Fixed: the sample now calls .get() on the future that run returns, and unwraps the cause before checking its type, as in 7.1.
Fixed the same sample in 7.0, and corrected the comment about the SubscriptionClosedException in 6.2, 7.0 and 7.1.
Tested with server 6.2.4 and Java client 6.0.2: the sample now ends only after all documents are processed, and the SubscriptionClosedException is handled as expected.
There was a problem hiding this comment.
Issue (Blocker): The primary-worker loop never retries and keeps a CPU core busy. run returns at once, so the next iteration calls run again on the same worker, which throws IllegalStateException("The subscription is already running"). The empty catch swallows it, and the loop repeats with no pause.
Lines: versioned_docs/version-6.2/client-api/data-subscriptions/consumption/content/_examples-java.mdx:256-265
Evidence: src/main/java/net/ravendb/client/documents/subscriptions/AbstractSubscriptionWorker.java:167-168 (Java client v6.0).
Fix: create a new worker in each iteration, call .get() on run, and close the worker in finally, as in 7.2 (docs/data-subscriptions/content/_consuming-subscription-java.mdx:648-666).
Priority: Blocker. The failover this sample demonstrates never happens, and nothing reports it.
There was a problem hiding this comment.
Fixed: the primary worker sample now creates a new worker in each iteration, calls .get() on the future that run returns, and closes the worker in finally, as in 7.1.
Fixed the same sample in 7.0.
Tested with server 6.2.4 and Java client 6.0.2, together with the secondary worker sample: the primary worker takes the connection over, the secondary worker takes over while the primary is down, and the primary takes the connection back when it returns.
There was a problem hiding this comment.
Issue (Blocker): The secondary-worker loop has the same problem as the primary one. Every iteration after the first calls run on a running worker, the IllegalStateException is swallowed, and the loop spins without retrying.
Lines: versioned_docs/version-6.2/client-api/data-subscriptions/consumption/content/_examples-java.mdx:278-287
Fix: as in 7.2 (docs/data-subscriptions/content/_consuming-subscription-java.mdx:672-690).
Priority: Blocker. Same reason as the primary worker.
There was a problem hiding this comment.
Fixed the same way as the primary worker sample, here and in 7.0.
Tested with server 6.2.4 and Java client 6.0.2, together with the primary worker sample (see the reply on the primary worker loop).
garayx
left a comment
There was a problem hiding this comment.
@reebhub
6.2 follow-up: we need to apply the fixes from v7.2 to then v6.2 version. Each comment is a 6.2 page that still has a problem this PR already fixed in 7.2, and links the fixed 7.2 lines, so the fix is to port your 7.2 changes.
- 7 Blockers: Python and Java samples that don't wait for the future run returns, so they return at once or spin in a loop.
- 9 High: samples or API names that fail as soon as they run.
The Java buffer-names comment sits on the C# 6.2 API overview, because _api-overview-java.mdx isn't in this PR.
There was a problem hiding this comment.
Issue (High): The events table names after_acknowledgment, which is a list the worker never reads, so a handler appended to it never runs. Handlers must be registered with add_after_acknowledgment.
Line: versioned_docs/version-6.2/client-api/data-subscriptions/consumption/content/_api-overview-python.mdx:179
Evidence: self.after_acknowledgment = [] is never used (ravendb/documents/subscriptions/worker.py:174). The worker calls only the handlers stored by add_after_acknowledgment (:206-207, :212-214). Python client v5.2.
Fix: rename the row to add_after_acknowledgment, as in 7.2 (docs/data-subscriptions/content/_consuming-subscription-python.mdx:804).
Priority: High. Code that follows the table fails silently.
There was a problem hiding this comment.
Fixed: the row is now add_after_acknowledgment, described as the method that registers the handler.
Also corrected the tables under it: the handler's return value is None (the table gave Future[None]), since the worker calls the handler synchronously.
Fixed the same row and tables in 7.0 and 7.1.
Tested with server 6.2.4 and Python client 5.2.6, server 7.0.2 and Python client 7.0.2.post1, and server 7.1.5 and Python client 7.1.5: a handler appended to the list is never called, and a handler registered with the method is called after each acknowledged batch.
…thon and Java pages Fix the same samples, tables and comments in 7.0-7.2 where they had the same errors
|
@LielNagar can you please review the new Java version of the 7.2 "Creating a data subscription" API page? |
Issue links
RDoc-3732 [Per-feature reorganization]
RDoc-3892 [Per-feature reorganization] creation (API, Stidio)
RDoc-3893 [Per-feature reorganization] consuming
RDoc-3895 [Per-feature reorganization] concurrent subscriptions
RDoc-3896 [Per-feature reorganization] revisions support
RDoc-3897 [Per-feature reorganization] maintenance
RDoc-3898 [Per-feature reorganization] monitoring
RDoc-3891 [Per-feature reorganization] overview
RDoc-3899 [Per-feature reorganization] configuration
RDoc-3900 [Per-feature reorganization] FAQ page
RDoc-3876 document ToSubscriptionCreationOptions
RDoc-3894 explain worker reconnects, stops, timeouts
RDoc-4125 document subscription worker status and state changes
RDoc-4126 remove rename-by-ID claim
RDoc-2935 update event properties
RDoc-3003 update worker's stop cases list
RDoc-3007 document
SubscriptionBatchmembers and session-option limitsRDoc-3006 fix & complete consumption examples
RDoc-2150 update java and Node.js examples
RDoc-3000 subscription creation API edits: starting point, RQL, include
RDoc-2977 add missing archived data content and references
RDoc-3055 dropping all connections vs dropping a specific connection
RDoc-2982 updated subscription creation explanations and examples
RDoc-3909 document constructor-based projections
RDoc-4133 add a projections panel to creating-subscription_api
RDoc-3502 subscribe to changes in metadata
RDoc-2228 purpose, creating a subscription once, usage example, FAQ entry
RDoc-2247 check if a subscription exists, create a subscription via update
RDoc-3050 revisions support: include related docs, read revision metadata
RDoc-4132 document concurrent subscriptions for Java
RDoc-2123 update Sharding subscriptions page
RDoc-4182 add a Java version to the 7.2 creating-subscription API page
Type of change
/templatesor readme)Changes in docs URLs
/scripts/redirects.jsonfile, setDocuments MovedPR label)Changes in UX/UI