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

Unable to create wiredTiger database with name containing ASCII control character with directoryperdb

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.1.4
    • Component/s: Storage, WiredTiger
    • Labels:
    • Environment:
      Identified on Linux.
    • Backwards Compatibility:
      Minor Change
    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide

      Compile the attached C++ program. This program will take a hex code as an argument and create a database whose name is the character represented by the hex code.

      Start mongod with --directoryperdb and --storageEngine wiredTiger

      Run ./unprintable 07

      Show
      Compile the attached C++ program. This program will take a hex code as an argument and create a database whose name is the character represented by the hex code. Start mongod with --directoryperdb and --storageEngine wiredTiger Run ./unprintable 07

      Description

      Creating a database whose name consists of a single ASCII control character will fail on wiredTiger when using directoryperdb. The resulting error message is:

      2015-01-06T15:57:47.849-0500 E STORAGE [conn1] WiredTiger (22) [1420577867:849716][8582:0x7f7f6cee1700], session.create: Error parsing 'source="file:/collection-2--8284435167946820371.wt"' at byte 13: Unexpected character: Invalid argument
      2015-01-06T15:57:47.849-0500 I - [conn1] Assertion: 2:22: Invalid argument
      2015-01-06T15:57:47.850-0500 I WRITE [conn1] insert .col query:

      { _id: ObjectId('54ac4c4b45b361825ef700be'), data: true }

      ninserted:0 keyUpdates:0 exception: 22: Invalid argument code:2 249ms

      Either disabling directoryperdb or using mmapv1 prevents this error from occurring.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: