[SERVER-35388] Improve misleading error messages for aggregation stages banned in transactions Created: 04/Jun/18 Updated: 29/Oct/23 Resolved: 25/Jun/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying, Replication |
| Affects Version/s: | None |
| Fix Version/s: | 4.0.2, 4.1.1 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Tess Avitabile (Inactive) | Assignee: | Samyukta Lanka |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Backport Requested: |
v4.0
|
||||||||||||
| Sprint: | Repl 2018-06-18, Repl 2018-07-02 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
The error messages vary for the aggregation stages not allowed in transactions, as tested in read_concern_snapshot_aggregation.js. Since the readConcern level is upconverted to "snapshot" for transactions, and some of these stages only work with particular readConcern levels, they may error due to the readConcern, which could cause a user to think that the transaction would succeed if they specify a different readConcern level. It would be more helpful to provide an error message that the stage is banned in transactions. Examples:
|
| Comments |
| Comment by Githook User [ 03/Aug/18 ] |
|
Author: {'name': 'Samy Lanka', 'email': 'samy.lanka@gmail.com', 'username': 'lankas'}Message: (cherry picked from commit a21c7c7e0d0dcd7bd9b11d62f95ec6496bc617e8) |
| Comment by Githook User [ 25/Jun/18 ] |
|
Author: {'username': 'lankas', 'name': 'Samy Lanka', 'email': 'samy.lanka@gmail.com'}Message: |
| Comment by Tess Avitabile (Inactive) [ 04/Jun/18 ] |
|
This came up in kay.kim's work documenting aggregation stages allowed in transactions. |