[SERVER-32502] Create a test that simulates unique index constraint violation Created: 02/Jan/18  Updated: 30/Oct/23  Resolved: 06/Feb/18

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

Type: Improvement Priority: Major - P3
Reporter: Alexander Gorrod Assignee: Neha Khatri
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File unique_index_violation.js     File unique_index_violation_1.0.js    
Backwards Compatibility: Fully Compatible
Sprint: Storage 2018-01-15, Storage 2018-01-29, Storage 2018-02-12
Participants:

 Description   

We are expecting that future work related to timestamps will lead to unique indexes not being reliable on secondaries. We should craft a C++ unit test that simulates how they will break to facilitate work on implementing a solution to the problem.



 Comments   
Comment by Neha Khatri [ 06/Feb/18 ]

Attached the reviewed test script unique_index_violation_1.0.js

Comment by Eric Milkie [ 23/Jan/18 ]

I think the test attached here might have a chance of triggering the condition, but I think we can improve the chances that it actually hits it. If you could serve up this file in codereview, I can leave some comments on my ideas.

Comment by Alexander Gorrod [ 23/Jan/18 ]

We worked together to create a javascript test that can be used to test the unique index violation. milkie would you mind taking a look at the test and letting us know if you think it should trigger the condition that requires unique index constraint checking to be relaxed on the secondary?

Comment by Alexander Gorrod [ 22/Jan/18 ]

I did some searching through JIRA, and I think a good starting point for this would be the case outlined in SERVER-19618. I suspect we can't use applyOps - since it won't enable the dupsAllowed mode, but the basic functionality we want to test is described there.

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