[DOCS-16583] [SERVER] Investigate changes in SERVER-83119: Secondary replica crashes on clustered collection if notablescan is enabled Created: 12/Jan/24  Updated: 05/Feb/24

Status: Backlog
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: 7.0.0, 7.3.0-rc0, 7.2.1, 7.0.6

Type: Task Priority: Minor - P4
Reporter: Backlog - Core Eng Program Management Team Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: backlog, clustered-collections, feature
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
backports DOCS-16591 [BACKPORT] [v7.2] Secondary replica c... Closed
Documented
documents SERVER-83119 Secondary replica crashes on clustere... Closed
Participants:
Days since reply: 5 days ago

 Description   
Original Downstream Change Summary

This change modifies the notablescan semantics. Previously if a collection was clustered and the notablescan option was set a plan involving a clustered index scan would be rejected due to the notablescan.

Note that this PR will be backported to all supported LTS versions

Description of Linked Ticket

On a clustered collection when notablescan is enabled:

  • Query to delete multiple documents using a secondary index on the primary.  Eg., db.coll.remove({x:{$gte:0}}), where an index is defined for the field x.
  • We replicate oplog entries to delete documents on the secondary replica by _id
  • On the secondary, the deletion is not done by the indexed field x but by _id.  However, the query system doesn't recognize the clustered index as a real _id index, and it fails. This causes a crash of the secondary replica.

In this scenario, the plan for the delete by _id on the secondary would include a CLUSTERED_IXSCAN and thus should not be blocked by the notablescan setting.

The solution is to fix the planner logic to allow CLUSTERED_IXSCAN with the notablescan setting.

See the repro script in the comment below and see the code here



 Comments   
Comment by Education Bot [ 02/Feb/24 ]

Fix Version updated for upstream SERVER-83119:
7.2.1, 7.3.0-rc0, 7.0.6

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