[SERVER-27788] Add tests for operationTime Created: 23/Jan/17  Updated: 06/Dec/17  Resolved: 05/Apr/17

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

Type: Task Priority: Major - P3
Reporter: Misha Tyulenev Assignee: Jack Mulrow
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Sharding 2017-03-27, Sharding 2017-04-17
Participants:

 Description   

Validate that the operationTime value depends on the read/writeConcern of the read or write command that produced it:

  • read with readConcern level majority: operationTime is the logical time of the last op in the oplog, in the snapshot blessed as ‘committed’.
    start standalone RS, issue a w:majority write, read operationTime OT1 from the result,
    pause the secondary replication using a failpoint,
    issue another w:1 write and get the operationTime OT2.
    Validate that read with readConcern: {level:majority, afterClusterTime: OT1}

    returns the data from write 1 and the operationTime in the response is OT1

  • read with readConcern level local: operationTime is the logical time of the last op in the oplog.
    check that it is not supported (as of now)
  • write with writeConcern majority: operationTime is the logical time of the write (if successful) or the previous successful write at the time the write was determined to have failed or a no-op.
    start standalone RS, issue a w:majority write, read operationTime OT1 from the result,
    pause the secondary replication using a failpoint,
    issue another a write that will fail (e.g _id that is duplicates the previous insert)
    read operationTime OT2 from the response and validate that OT2 == OT1


 Comments   
Comment by Githook User [ 05/Apr/17 ]

Author:

{u'username': u'jsmulrow', u'name': u'Jack Mulrow', u'email': u'jack.mulrow@mongodb.com'}

Message: SERVER-27788 Add tests for operationTime
Branch: master
https://github.com/mongodb/mongo/commit/39d74ea0f66cc56a005a78466ad8721971960fd0

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