[SERVER-34092] Add test for staleDbVersion when opening a change stream against a database that has been dropped and recreated Created: 23/Mar/18  Updated: 26/Apr/18  Resolved: 26/Apr/18

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Nicholas Zolnierz Assignee: Ian Boros
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Sprint: Query 2018-04-23, Query 2018-05-07
Participants:

 Description   

It may be difficult to test, but there's a chance when a change stream is opened against a non-existent database that the AutoGetOrCreateDB helper throws a StaleDB exception.



 Comments   
Comment by Ian Boros [ 26/Apr/18 ]

Closing as "Won't Fix" because of above comment.

Comment by Ian Boros [ 23/Apr/18 ]

I don't think it's possible for this to happen for now, since the aggregate command doesn't send dbVersion:
https://github.com/mongodb/mongo/blob/8941fac630e0ac31649a1e32b0ea54c3930bdfec/jstests/sharding/database_and_shard_versioning_all_commands.js#L55-L59

This means that any check for the command's dbVersion will be skipped in DatabaseShardingState:
https://github.com/mongodb/mongo/blob/8941fac630e0ac31649a1e32b0ea54c3930bdfec/src/mongo/db/s/database_sharding_state.cpp#L89-L92

Generated at Thu Feb 08 04:35:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.