[SERVER-64780] Resharding change stream events are not filtered by namespace Created: 22/Mar/22 Updated: 29/Oct/23 Resolved: 06/Apr/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 5.2.1, 5.3.0-rc4 |
| Fix Version/s: | 5.3.2, 6.0.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Bernard Gorman | Assignee: | Mickey Winters |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | pm1950-m2 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Operating System: | ALL | ||||||||||||
| Backport Requested: |
v5.3
|
||||||||||||
| Sprint: | QE 2022-04-04, QE 2022-04-18 | ||||||||||||
| Participants: | |||||||||||||
| Linked BF Score: | 174 | ||||||||||||
| Description |
|
If a change steam is opened on a particular collection with showMigrationEvents:true and a resharding operation happens on another collection, the stream will erroneously report reshardBegin and reshardDoneCatchup events. This issue does not appear to happen on 5.0, and was likely introduced during the extensive change stream rewrite in PM-1942. |
| Comments |
| Comment by Githook User [ 17/May/22 ] |
|
Author: {'name': 'Mickey. J Winters', 'email': 'mickey.winters@mongodb.com', 'username': 'mjrb'}Message: |
| Comment by Githook User [ 28/Apr/22 ] |
|
Author: {'name': 'Mickey. J Winters', 'email': 'mickey.winters@mongodb.com', 'username': 'mjrb'}Message: |
| Comment by Githook User [ 06/Apr/22 ] |
|
Author: {'name': 'Mickey. J Winters', 'email': 'mickey.winters@mongodb.com', 'username': 'mjrb'}Message: |
| Comment by Bernard Gorman [ 22/Mar/22 ] |
| Comment by Bernard Gorman [ 22/Mar/22 ] |
|
Attached a reproduction test above. The solution to this issue is to simply add a predicate on "ns" to buildInternalOpFilter. With that predicate in place, we can change the o.shardCollection and o.migrateLastChunkFromShard predicates to simple existence tests. |