[SERVER-35732] Hyphenated database names do not work with dbStats.fsUsedSize / TotalSize Created: 21/Jun/18  Updated: 29/Oct/23  Resolved: 30/Nov/18

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: 3.6.5
Fix Version/s: 3.6.11, 4.0.7, 4.1.6

Type: Bug Priority: Major - P3
Reporter: Cezary Bartosiak Assignee: Xiangyu Yao (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating system: Ubuntu 16.04.4 LTS
MongoDB version: v3.6.5


Attachments: PNG File 1.PNG     PNG File image-2018-06-21-22-12-58-104.png     PNG File image-2018-06-21-22-15-36-518.png     PNG File image-2018-06-21-22-16-28-048.png    
Issue Links:
Backports
Duplicate
is duplicated by SERVER-35801 Failed to query filesystem disk stats... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.0, v3.6
Sprint: Storage NYC 2018-12-03
Participants:
Case:

 Description   

I have the following two databases:

and configured Mongo to store each one in a separate folder:

These two databases are stored under /mnt/disks/mongodb/data path. The data folder is also owned by mongodb user/group.

I'm trying to run the following command for each database:

In case of test it works fine, but in case of test-hyphen I get this error:

Mongo cannot calculate fsUsedSize and fsTotalSize for this database. I suppose it is a bug related with a fact of translating the hyphen to ".45".

Could you please confirm?



 Comments   
Comment by Githook User [ 26/Feb/19 ]

Author:

{'name': 'Xiangyu Yao', 'username': 'xy24', 'email': 'xiangyu.yao@mongodb.com'}

Message: SERVER-35732 Fix dbStats.fsUsedSize behavior for database with hyphenated names

(cherry picked from commit e0be8ba5aa04df21f6a9a42578a349a4c303776d)
Branch: v4.0
https://github.com/mongodb/mongo/commit/2fabf81388ce6175af7cd27145ff8cabba2950df

Comment by Githook User [ 26/Feb/19 ]

Author:

{'name': 'Xiangyu Yao', 'username': 'xy24', 'email': 'xiangyu.yao@mongodb.com'}

Message: SERVER-35732 Test dbStats.fsUsedSize behavior for database with hyphenated names

(cherry picked from commit 2e206b90bde9e41263d4073522248091c49437fa)
Branch: v4.0
https://github.com/mongodb/mongo/commit/698410ce76f2b802227dfe633d7065ecd1f62678

Comment by Githook User [ 26/Feb/19 ]

Author:

{'name': 'Xiangyu Yao', 'email': 'xiangyu.yao@mongodb.com', 'username': 'xy24'}

Message: SERVER-35732 Fix dbStats.fsUsedSize behavior for database with hyphenated names

(cherry picked from commit e0be8ba5aa04df21f6a9a42578a349a4c303776d)
(cherry picked from commit cdf15b6db2e30f51c785c8e2c56472e793a7db69)
Branch: v3.6
https://github.com/mongodb/mongo/commit/b4339db12bf57ffee5b84a95c6919dbd35fe31c9

Comment by Githook User [ 26/Feb/19 ]

Author:

{'name': 'Xiangyu Yao', 'email': 'xiangyu.yao@mongodb.com', 'username': 'xy24'}

Message: SERVER-35732 Test dbStats.fsUsedSize behavior for database with hyphenated names

(cherry picked from commit 2e206b90bde9e41263d4073522248091c49437fa)
Branch: v3.6
https://github.com/mongodb/mongo/commit/89ac0ad62309ee4103cadb0a1d56581923b51d1e

Comment by Githook User [ 25/Feb/19 ]

Author:

{'name': 'Xiangyu Yao', 'username': 'xy24', 'email': 'xiangyu.yao@mongodb.com'}

Message: SERVER-35732 Test dbStats.fsUsedSize behavior for database with hyphenated names
Branch: master
https://github.com/mongodb/mongo/commit/2e206b90bde9e41263d4073522248091c49437fa

Comment by Eric Milkie [ 05/Dec/18 ]

I don't really follow that line of reasoning – if enough users were affected by this, we would consider a backport, taking into account the surface area of the fix and what it might affect.
At this time, I don't see a reason to backport this.

Comment by Nic Cottrell [ 05/Dec/18 ]

Does this have any other side-effects? If not, I guess there is no need for a backport?

Comment by Githook User [ 30/Nov/18 ]

Author:

{'name': 'Xiangyu Yao', 'email': 'xiangyu.yao@mongodb.com', 'username': 'xy24'}

Message: SERVER-35732 Fix dbStats.fsUsedSize behavior for database with hyphenated names
Branch: master
https://github.com/mongodb/mongo/commit/e0be8ba5aa04df21f6a9a42578a349a4c303776d

Comment by Nick Brewer [ 22/Jun/18 ]

You're correct - good catch! Updated.

Nick

Comment by Cezary Bartosiak [ 22/Jun/18 ]

No problem. Also, I can see you changed the title, but I'm wondering if "collection names" was intentional. Shouldn't it be "database names"?

Comment by Nick Brewer [ 22/Jun/18 ]

cbartosiak

Thanks for your report. I was able to recreate the behavior you've described, and I've passed this along to our storage team for evaluation.

Nick

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