Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-20738

Oplog stones does not enforce ascending order of RecordIds

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.2.0-rc0
    • Affects Version/s: 3.1.8
    • Component/s: Storage
    • Labels:
      None
    • Fully Compatible
    • ALL
    • QuInt A (10/12/15), QuInt B (11/02/15)

      Had a failure during a patch build where WT_SESSION::truncate() returned an error that the starting position of the truncate is after the stop position.

      [js_test:fsm_all_replication] 2015-10-02T06:36:50.117+0000 d20010| 2015-10-02T06:36:50.100+0000 E STORAGE  [WT RecordStoreThread: local.oplog.rs] WiredTiger (22) [1443767810:97093][18185:0x2b3eed902940], WT_SESSION.truncate: the start cursor position is after the stop cursor position: Invalid argument
      [js_test:fsm_all_replication] 2015-10-02T06:36:50.118+0000 d20010| 2015-10-02T06:36:50.100+0000 I -        [WT RecordStoreThread: local.oplog.rs] Invariant failure: session->truncate(session, nullptr, start, end, nullptr) resulted in status BadValue 22: Invalid argument at src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp 1131
      [js_test:fsm_all_replication] 2015-10-02T06:36:50.118+0000 d20010| 2015-10-02T06:36:50.110+0000 I CONTROL  [WT RecordStoreThread: local.oplog.rs]
      [js_test:fsm_all_replication] 2015-10-02T06:36:50.119+0000 d20010|  0x1262992 0x1210914 0x11fcb6d 0xff47ce 0xffe03b 0xffe4d8 0x1200827 0x19a5d60 0x2b3ee024783d 0x2b3ee0532fdd
      [js_test:fsm_all_replication] 2015-10-02T06:36:50.119+0000 d20010| ----- BEGIN BACKTRACE -----
      [js_test:fsm_all_replication] 2015-10-02T06:36:50.121+0000 d20010| {"backtrace":[{"b":"400000","o":"E62992"},{"b":"400000","o":"E10914"},{"b":"400000","o":"DFCB6D"},{"b":"400000","o":"BF47CE"},{"b":"400000","o":"BFE03B"},{"b":"400000","o":"BFE4D8"},{"b":"400000","o":"E00827"},{"b":"400000","o":"15A5D60"},{"b":"2B3EE0241000","o":"683D"},{"b":"2B3EE045E000","o":"D4FDD"}],"processInfo":{ "mongodbVersion" : "3.1.9-pre-", "gitVersion" : "3223f84a8eeaf89a30d6789038e5d68c7b019108", "compiledModules" : [], "uname" : { "sysname" : "Linux", "release" : "2.6.18-194.el5xen", "version" : "#1 SMP Tue Mar 16 22:01:26 EDT 2010", "machine" : "x86_64" }, "somap" : [ { "elfType" : 2, "b" : "400000" }, { "b" : "2B3EDF6A2000", "path" : "/lib64/librt.so.1", "elfType" : 3 }, { "b" : "2B3EDF8AB000", "path" : "/lib64/libdl.so.2", "elfType" : 3 }, { "b" : "2B3EDFAAF000", "path" : "/usr/lib64/libstdc++.so.6", "elfType" : 3 }, { "b" : "2B3EDFDB0000", "path" : "/lib64/libm.so.6", "elfType" : 3 }, { "b" : "2B3EE0033000", "path" : "/lib64/libgcc_s.so.1", "elfType" : 3 }, { "b" : "2B3EE0241000", "path" : "/lib64/libpthread.so.0", "elfType" : 3 }, { "b" : "2B3EE045E000", "path" : "/lib64/libc.so.6", "elfType" : 3 }, { "b" : "2B3EDF484000", "path" : "/lib64/ld-linux-x86-64.so.2", "elfType" : 3 } ] }}
      [js_test:fsm_all_replication] 2015-10-02T06:36:50.122+0000 d20010|  mongod(_ZN5mongo15printStackTraceERSo+0x32) [0x1262992]
      [js_test:fsm_all_replication] 2015-10-02T06:36:50.122+0000 d20010|  mongod(_ZN5mongo10logContextEPKc+0x134) [0x1210914]
      [js_test:fsm_all_replication] 2015-10-02T06:36:50.122+0000 d20010|  mongod(_ZN5mongo17invariantOKFailedEPKcRKNS_6StatusES1_j+0xAD) [0x11fcb6d]
      [js_test:fsm_all_replication] 2015-10-02T06:36:50.122+0000 d20010|  mongod(_ZN5mongo21WiredTigerRecordStore12reclaimOplogEPNS_16OperationContextE+0x76E) [0xff47ce]
      [js_test:fsm_all_replication] 2015-10-02T06:36:50.123+0000 d20010|  mongod(+0xBFE03B) [0xffe03b]
      [js_test:fsm_all_replication] 2015-10-02T06:36:50.123+0000 d20010|  mongod(+0xBFE4D8) [0xffe4d8]
      [js_test:fsm_all_replication] 2015-10-02T06:36:50.123+0000 d20010|  mongod(_ZN5mongo13BackgroundJob7jobBodyEv+0x157) [0x1200827]
      [js_test:fsm_all_replication] 2015-10-02T06:36:50.123+0000 d20010|  mongod(+0x15A5D60) [0x19a5d60]
      [js_test:fsm_all_replication] 2015-10-02T06:36:50.124+0000 d20010|  libpthread.so.0(+0x683D) [0x2b3ee024783d]
      [js_test:fsm_all_replication] 2015-10-02T06:36:50.124+0000 d20010|  libc.so.6(clone+0x6D) [0x2b3ee0532fdd]
      [js_test:fsm_all_replication] 2015-10-02T06:36:50.124+0000 d20010| -----  END BACKTRACE  -----
      [js_test:fsm_all_replication] 2015-10-02T06:36:50.124+0000 d20010| 2015-10-02T06:36:50.110+0000 I -        [WT RecordStoreThread: local.oplog.rs]
      [js_test:fsm_all_replication] 2015-10-02T06:36:50.125+0000 d20010|
      [js_test:fsm_all_replication] 2015-10-02T06:36:50.125+0000 d20010| ***aborting after invariant() failure
      

      Proposal is to skip creating a stone in WiredTigerRecordStore::OplogStones::createNewStoneIfNeeded() if the specified RecordId comes before the most recently created stone's last record.

            Assignee:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Reporter:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: