[SERVER-36055] Mobile SE: Compact returns wrong error code on mobile Created: 10/Jul/18  Updated: 29/Oct/23  Resolved: 23/Jul/18

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.0.1, 4.1.2

Type: Bug Priority: Major - P3
Reporter: Sean Tao Assignee: Sulabh Mahajan
Resolution: Fixed Votes: 0
Labels: nonnyc, storage-engines, todo_in_code
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Documented
is documented by DOCS-11891 Docs for SERVER-36055: Mobile SE: Com... Closed
Related
related to SERVER-43507 Complete TODO listed in SERVER-36055 Closed
related to SERVER-44690 Complete TODO listed in SERVER-36055 Closed
is related to SERVER-33998 Remove the parallelCollectionScan com... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.0
Sprint: Storage Engines 2018-07-30
Participants:

 Description   

Compact command on mobile fails with error code: 59, with message "no such command: 'compact'", as opposed to the proper error code: CommandNotSupported.

 

Example code when run on storage to generate the error:

db.runCommand({compact: "coll"});

 



 Comments   
Comment by Githook User [ 23/Jul/18 ]

Author:

{'name': 'Sulabh Mahajan', 'email': 'sulabh.mahajan@mongodb.com', 'username': 'sulabhM'}

Message: SERVER-36055 Return a proper error for unsupported compact on mobile

(cherry picked from commit 1c1535c9ee73ac4ed0d922855ccbe44335909082)
Branch: v4.0
https://github.com/mongodb/mongo/commit/e00b7670f274bad696c3a6b89884895c9664031f

Comment by Githook User [ 23/Jul/18 ]

Author:

{'username': 'sulabhM', 'name': 'Sulabh Mahajan', 'email': 'sulabh.mahajan@mongodb.com'}

Message: SERVER-36055 Return a proper error for unsupported compact on mobile
Branch: master
https://github.com/mongodb/mongo/commit/1c1535c9ee73ac4ed0d922855ccbe44335909082

Comment by Sulabh Mahajan [ 20/Jul/18 ]

sean.tao,
I am not sure how you got that error. I checked on latest master and we were not yet failing compact as unsupported and returning success instead.
I am making changes to fail with a proper error. Post the changes it should look like as follows:

> db.runCommand({compact: "abcd"});
{
        "ok" : 0,
        "errmsg" : "cannot compact collection with record store: Mobile",
        "code" : 115,
        "codeName" : "CommandNotSupported"
}

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