[SERVER-67029] Make aggregate command in internal_transactions* workloads robust against failover/shutdown or collection rename Created: 05/Jun/22  Updated: 29/Oct/23  Resolved: 07/Jun/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.0.0-rc9, 6.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Cheahuychou Mao Assignee: Cheahuychou Mao
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v6.0
Sprint: Sharding NYC 2022-06-13
Participants:
Linked BF Score: 60

 Description   

As shown in BF-25473, the aggregate command used to get a random document involves running getMore commands which can fail with a QueryPlanKilled error in the following cases:

  1. The node steps down or restarts between when the cursor is opened and when a getMore command arrives at the node.
  2. The node renames the collection due to resharding between when the cursor is opened and when a getMore command arrives at the node.

This is expected and the internal_transactions* workloads should retry the aggregate command in these cases. Alternatively, the aggregate command should be run with a large batchSize to avoid getMore commands.



 Comments   
Comment by Githook User [ 07/Jun/22 ]

Author:

{'name': 'Cheahuychou Mao', 'email': 'mao.cheahuychou@gmail.com', 'username': 'cheahuychou'}

Message: SERVER-67029 Make aggregate command in internal_transactions* workloads robust against failover/shutdown or collection rename

(cherry picked from commit b6b89a30190ce3fb85111959c0773b730fd08aa3)
Branch: v6.0
https://github.com/mongodb/mongo/commit/5edd6ea16733548aacdc25c5eefb0673dd98ea09

Comment by Githook User [ 07/Jun/22 ]

Author:

{'name': 'Cheahuychou Mao', 'email': 'mao.cheahuychou@gmail.com', 'username': 'cheahuychou'}

Message: SERVER-67029 Make aggregate command in internal_transactions* workloads robust against failover/shutdown or collection rename
Branch: master
https://github.com/mongodb/mongo/commit/b6b89a30190ce3fb85111959c0773b730fd08aa3

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