-
Type: Spec Change
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Component/s: CRUD
-
None
-
Needed
-
Summary
The unified tests for aggregations with an $out stage began failing with the 8.0 server versions. After investigation (SERVER-90047) it was determined that the new behavior is intentional, and drivers should update their tests accordingly.
jeff.yemin@mongodb.com suggested the following fix:
"It seems like a viable workaround would just be to remove the initialData section for coll1, e.g. this bit: https://github.com/mongodb/specifications/blob/master/source/crud/tests/unified/aggregate-write-readPreference.yml#L54-L56. If we do that, then the test will not attempt to create the collection at all, and $out will take care of it. And since $out replaces any existing documents in the collection with the output of the $out stage, the outcome will be the same."
Besides crud/tests/unified/aggregate-write-readPreference.yml, this issue also affects at least crud/tests/unified/db-aggregate-write-readPreference.yml.
Motivation
Who is the affected end user?
All drivers (potentially).
How does this affect the end user?
When run against server version 8.0+, the aggregation+$out specs fail with an error: "PlanExecutor error during aggregation :: caused by :: indexes of target collection db0.coll1 changed during processing".
How likely is it that this problem or use case will occur?
These specs consistently fail.
If the problem does occur, what are the consequences and how severe are they?
Build failures.
Is this issue urgent?
There is no user-facing impact. The consequences purely affect the mentioned subset of aggregation specs.
Is this ticket required by a downstream team?
No.
Is this ticket only for tests?
Yes.
Acceptance Criteria
The aggregation CRUD specs must pass.
- fixes
-
PYTHON-4356 [Build Failure] TestUnifiedDbAggregateWriteReadPreference on Latest
- Ready for Work
- related to
-
SERVER-90047 Aggregation with $out fails on 8.1.0, with replica-set
- Closed
-
RUBY-3539 aggregate-write-readPreference spec fails on 8.0/latest
- Closed
- split to
-
GODRIVER-3219 Server 8.0+ requires tests for aggregation with $out to not pre-create output collection
- Backlog
-
RUST-1950 Server 8.0+ requires tests for aggregation with $out to not pre-create output collection
- Backlog
-
RUBY-3480 Server 8.0+ requires tests for aggregation with $out to not pre-create output collection
- Ready for Work
-
CDRIVER-5579 Server 8.0+ requires tests for aggregation with $out to not pre-create output collection
- Closed
-
CSHARP-5098 Server 8.0+ requires tests for aggregation with $out to not pre-create output collection
- Closed
-
CXX-3035 Server 8.0+ requires tests for aggregation with $out to not pre-create output collection
- Closed
-
JAVA-5481 Server 8.0+ requires tests for aggregation with $out to not pre-create output collection
- Closed
-
MOTOR-1318 Server 8.0+ requires tests for aggregation with $out to not pre-create output collection
- Closed
-
NODE-6184 Server 8.0+ requires tests for aggregation with $out to not pre-create output collection
- Closed
-
PHPLIB-1458 Server 8.0+ requires tests for aggregation with $out to not pre-create output collection
- Closed
-
PYTHON-4453 Server 8.0+ requires tests for aggregation with $out to not pre-create output collection
- Closed