[SERVER-16765] WiredTiger accepts fewer characters in database names when using directoryperdb Created: 07/Jan/15  Updated: 14/Apr/16  Resolved: 13/May/15

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

Type: Bug Priority: Major - P3
Reporter: Spencer Jackson Assignee: David Hows
Resolution: Duplicate Votes: 0
Labels: 28qa, wiredtiger
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-16741 Unable to create wiredTiger database ... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

Start a database with directoryperdb and wiredTiger.

> use ,
switched to db ,
> db.col.insert({})
WriteResult({
        "nInserted" : 0,
        "writeError" : {
                "code" : 2,
                "errmsg" : "22: Invalid argument"
        }
})

2015-01-07T15:11:09.603-0500 E STORAGE  [conn1] WiredTiger (22) [1420661469:603375][9030:0x7f1117d29700], session.create: ,/collection-0--875367581904899163: WiredTiger objects should not include grouping characters in their names: Invalid argument
2015-01-07T15:11:09.603-0500 I -        [conn1] Assertion: 2:22: Invalid argument

Alternatively,

> use :
switched to db :
> db.col.insert({})
WriteResult({
        "nInserted" : 0,
        "writeError" : {
                "code" : 8,
                "errmsg" : "2: No such file or directory"
        }
})

2015-01-07T15:13:20.314-0500 E STORAGE  [conn1] WiredTiger (2) [1420661600:314591][9030:0x7f1117d29700], session.create: Can't create 'colgroup::/collection-1--875367581904899163' for non-existent table '': No such file or directory
2015-01-07T15:13:20.314-0500 I -        [conn1] Assertion: 8:2: No such file or directory

Participants:

 Description   

When a mongod is starting using wiredTiger and --directoryperdb, characters in the database name are exposed to WiredTiger and interperated as a part of the Data Source URI described at http://source.wiredtiger.com/1.6.5/data_sources.html. This means that, for example, the colon character : is seen as a separator between a table name and a column group name. Additionally WiredTiger will filter out the following characters from the name: {},:[]\\\"'
This will occur in the function __wt_str_name_check



 Comments   
Comment by David Hows [ 13/May/15 ]

I believe that this should also be solved by the change in SERVER-16741.

Comment by Spencer Jackson [ 13/Jan/15 ]

Hm. I think it's different underlying issues, because I'm getting different error messages.

An ASCII control characters give the error:
2015-01-13T17:56:37.424-0500 E STORAGE [conn1] WiredTiger (22) [1421189797:424690][11204:0x7f9902e93700], session.create: Error parsing 'source="file:/collection-2--419878968351250664.wt"' at byte 13: Unexpected character: Invalid argument

I think that one might have to do with option parsing in __config_next? But yes, now that you mention it, the end result is the same.

Comment by Michael Cahill (Inactive) [ 13/Jan/15 ]

Is this a duplicate of SERVER-16741? I see that the repro is different, but this looks like the same underlying issue. Am I missing something?

Generated at Thu Feb 08 03:42:11 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.