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

The validate cmd can invariant on corrupted keystrings

    • Storage Execution
    • Fully Compatible
    • ALL
    • v7.2, v7.1, v7.0, v6.0, v5.0, v4.4
    • Hide

      First insert a document into an index

      db.test.createIndex({a: 1})
      db.test.insert({_id: 1, a: "x"}) 

      Find out the ident of the secondary index

      db.runCommand({aggregate: "test", cursor: {}, pipeline:[{$listCatalog: {}}]}) 

      Shutdown the server. Dump the index table using a command similar to

      ~/mongo/build/install/bin/wt -r -C "log=(compressor=snappy,path=journal)" -h /data/db/ dump -x table:index-2-4842695354225906245 > error 

      Open the file and modify the value of the keystring to 3c7800040002. Then load the data back to the table using a command similar to

      build/install/bin/wt -h /data/db/ load -f error -r index-2-4842695354225906245 

      Start the server again and run the validate cmd. 

      Show
      First insert a document into an index db.test.createIndex({a: 1}) db.test.insert({_id: 1, a: "x"}) Find out the ident of the secondary index db.runCommand({aggregate: "test", cursor: {}, pipeline:[{$listCatalog: {}}]}) Shutdown the server. Dump the index table using a command similar to ~/mongo/build/install/bin/wt -r -C "log=(compressor=snappy,path=journal)" -h /data/db/ dump -x table:index-2-4842695354225906245 > error Open the file and modify the value of the keystring to 3c7800040002. Then load the data back to the table using a command similar to build/install/bin/wt -h /data/db/ load -f error -r index-2-4842695354225906245 Start the server again and run the validate cmd. 
    • Execution Team 2023-11-27

      When we traverse through the indexes, the validate cmd can invariant and crash the server when encountering corrupted keystrings.

            Assignee:
            yuhong.zhang@mongodb.com Yuhong Zhang
            Reporter:
            yuhong.zhang@mongodb.com Yuhong Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: