[SERVER-58857] Change stream accidentally filters out rename event from reshardCollection [5.0 Only] Created: 26/Jul/21  Updated: 29/Oct/23  Resolved: 24/Aug/21

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

Type: Bug Priority: Major - P3
Reporter: Randolph Tan Assignee: Rishab Joshi (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
related to SERVER-56872 Add optimization function to apply $m... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: QE 2021-08-09, QE 2021-08-23, QE 2021-09-06
Participants:

 Description   

The rename oplog looks like this:

{
  "op" : "c",
  "ns" : "reshardingDb.$cmd",
  "ui" : UUID("2c7b8ac2-9840-4c57-9d1c-4f9905ed1fe3"),
  "o" : {
    "renameCollection" : "reshardingDb.system.resharding.f1b71bc0-6a4c-4cd5-b6ef-ac50e5de3170",
    "to" : "reshardingDb.coll",
    "stayTemp" : false,
    "dropTarget" : UUID("f1b71bc0-6a4c-4cd5-b6ef-ac50e5de3170")
  },
  "o2" : {
    "numRecords" : 0
  },
  "ts" : Timestamp(1627312165, 17),
  "t" : NumberLong(1),
  "v" : NumberLong(2),
  "wall" : ISODate("2021-07-26T15:09:25.358Z"),
  "fromMigrate" : true
} 

But it gets filtered out because this fromMigrate != true expression is always present, regardless of the showMigrationEvents boolean argument.



 Comments   
Comment by Githook User [ 24/Aug/21 ]

Author:

{'name': 'Rishab Joshi', 'email': 'rishab.joshi@mongodb.com', 'username': 'rishvin'}

Message: SERVER-58857 Do not filter 'fromMigrate' events if 'showMigrationEvents' option has been specified.
Branch: v5.0
https://github.com/mongodb/mongo/commit/e15a429d9c1c2c6d5fe5d186b866ae7d8e7c6e60

Comment by Oren Ovadia [ 26/Jul/21 ]

Thanks Justin.

Question: Is it possible to backport this fix to 5.0?

CC:marcus.eagan

Generated at Thu Feb 08 05:45:38 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.