-
Type: Task
-
Resolution: Won't Do
-
Priority: Minor - P4
-
None
-
Component/s: CRUD
-
None
-
Not Needed
Summary
An empty pipeline array is a NOP for both update and findAndModify. The current CRUD spec tests for update pipelines only use non-empty pipeline arrays. We should test this to assert that drivers don't prohibit users from specifying an empty array (despite there being little reason to do so).
Consider:
> db.runCommand({ update: "foo", updates: [ { q: { _id: 1 }, u: [] } ] }) > db.runCommand({ findAndModify: "foo", query: { _id: 1 }, update: [] })
Motivation
Who is the affected end user?
Users wishing to execute NOP pipelines.
How does this affect the end user?
Users are potentially blocked if a driver happens to reject an empty pipeline.
How likely is it that this problem or use case will occur?
Very rare.
If the problem does occur, what are the consequences and how severe are they?
Drivers may potentially reject a valid pipeline argument.
Is this issue urgent?
No.
Is this ticket required by a downstream team?
No.
Is this ticket only for tests?
Yes.
- is related to
-
DRIVERS-626 Add the ability to specify a pipeline to an update command
- Closed
-
DRIVERS-744 Add missing tests for aggregation pipeline in bulk write updates
- Closed
- related to
-
PHPLIB-1129 Replace operations may inadvertently execute pipeline updates
- Closed
- split to
-
CDRIVER-4669 Add spec tests for passing empty pipeline arrays to update and findAndModify operations
- Closed
-
CSHARP-4687 Add spec tests for passing empty pipeline arrays to update and findAndModify operations
- Closed
-
CXX-2701 Add spec tests for passing empty pipeline arrays to update and findAndModify operations
- Closed
-
GODRIVER-2877 Add spec tests for passing empty pipeline arrays to update and findAndModify operations
- Closed
-
JAVA-5041 Add spec tests for passing empty pipeline arrays to update and findAndModify operations
- Closed
-
MOTOR-1146 Add spec tests for passing empty pipeline arrays to update and findAndModify operations
- Closed
-
NODE-5371 Add spec tests for passing empty pipeline arrays to update and findAndModify operations
- Closed
-
PHPLIB-1169 Add spec tests for passing empty pipeline arrays to update and findAndModify operations
- Closed
-
PYTHON-3768 Add spec tests for passing empty pipeline arrays to update and findAndModify operations
- Closed
-
RUBY-3282 Add spec tests for passing empty pipeline arrays to update and findAndModify operations
- Closed
-
RUST-1686 Add spec tests for passing empty pipeline arrays to update and findAndModify operations
- Closed