[DRIVERS-2189] getMore helper should explicitly send inherited comment Created: 03/Feb/22  Updated: 09/Aug/22  Resolved: 09/Aug/22

Status: Closed
Project: Drivers
Component/s: CRUD
Fix Version/s: None

Type: Spec Change Priority: Unknown
Reporter: Dmitry Rybakov Assignee: Dmitry Rybakov
Resolution: Done Votes: 0
Labels: size-small, spec-change
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Issue split
split to PHPLIB-749 Support comment option on command hel... Closed
split to CDRIVER-4199 Add support for the comment field to ... Closed
split to NODE-3984 getMore helper should explicitly send... Closed
split to CSHARP-4046 getMore helper should explicitly send... Closed
split to CXX-2450 getMore helper should explicitly send... Closed
split to GODRIVER-2303 getMore helper should explicitly send... Closed
split to JAVA-4489 getMore helper should explicitly send... Closed
split to MOTOR-890 getMore helper should explicitly send... Closed
split to PYTHON-3119 getMore helper should explicitly send... Closed
split to RUBY-2902 getMore helper should explicitly send... Closed
split to RUST-1179 getMore helper should explicitly send... Closed
Problem/Incident
causes DRIVERS-2243 Inherited comment causes OperationFai... Closed
Related
related to DRIVERS-742 Add support for the comment field to ... Closed
Driver Changes: Needed
Downstream Changes Summary:

This ticket changes how getMore command should treat the comment. Drivers should sync unified spec tests find, aggregate, and changeStreams from mongodb/specifications@0fc77cd.

Driver Compliance:
Key Status/Resolution FixVersion
CXX-2450 Fixed 3.7.0
CSHARP-4046 Done 2.15.0
GODRIVER-2303 Duplicate
JAVA-4489 Duplicate
NODE-3984 Duplicate
MOTOR-890 Duplicate
PYTHON-3119 Fixed 4.1
RUBY-2902 Fixed 2.18.0
RUST-1179 Duplicate
SWIFT-1485 Duplicate
PHPLIB-749 Fixed 1.13.0-beta1, 1.13.0
CDRIVER-4199 Fixed 1.22.0, 1.22.0-beta0

 Description   

Summary

When a cursor was created with comment option set, subsequent getMore command called for this cursor should explicitly send same comment, so that the comment is visible in monitoring events for getMore.

If getMore command is send without a comment, it still inherits the comment from the command that created the cursor. The comment will be visible in profiler, logs and $currentOp for that command. However, the comment will not be visible in monitoring events emitted for getMore. Since the main purpose of the comment is to help with debugging/monitoring/detecting problems, it should be visible in monitoring events.

Therefore, when a driver send a getMore command on a cursor that was created with a comment, the driver must send the same comment as an option of getMore command. 

See https://mongodb.slack.com/archives/C0VD105QA/p1643632893344749 for an example.

Motivation

Who is the affected end user?

Any user that wants to use comment for tracing purposes, and who relies on command monitoring for this task.

Is this issue urgent?

No. It might be easier to implement this together with DRIVERS-742, but this is not required.

Is this ticket only for tests?

No.



 Comments   
Comment by Githook User [ 10/Feb/22 ]

Author:

{'name': 'Dmitry Rybakov', 'email': 'dmitry.rybakov@mongodb.com', 'username': 'comandeo'}

Message: DRIVERS-2189 getMore sends inherited comment (#1141)
Branch: master
https://github.com/mongodb/specifications/commit/0fc77cd4a7b1b3ce6b5e29d6765cf9cc96658aff

Generated at Thu Feb 08 08:24:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.