[SERVER-3890] update / remove operations should display result from getLastError in shell Created: 16/Sep/11  Updated: 08/Nov/12  Resolved: 16/Sep/11

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Antoine Girbal Assignee: Antoine Girbal
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

In several user groups, people mentioned that it is very surprising that you dont automatically see how many items were updated / removed from the shell.
For an admin, there always want to see this.
Since we're calling getLastError anyway, we should probably display the result object.



 Comments   
Comment by Ian Whalen (Inactive) [ 08/Nov/12 ]

Hi Dan, for general questions (like this one about packaging) your best bet is to create a thread on our forums at https://groups.google.com/forum/?fromgroups#!forum/mongodb-user and our team will follow up with you there.

Comment by Dan Dascalescu [ 08/Nov/12 ]

Looks like Ubuntu packages 2.0.4. I followed the instructions at http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu (see SERVER-7589) and ended up with 2.0.7. How can I install a newer stable version?

Comment by Tad Marshall [ 07/Nov/12 ]

The verbose shell feature was added in version 2.1.0 (SERVER-1507). Can you try version 2.2.1 (for example) and see if that helps?

Comment by Dan Dascalescu [ 07/Nov/12 ]

Uh... why is this closed? I wanted to raise the same issue. With IDs being human-unfriendly strings, it's completely useless if

db.users.remove({_id: 'bc1a82b5-f77d-432a-94f3-8390e57d53c5'})

and

db.users.remove({_id: 'a25b455a-3f10-4e20-a812-e964db30d5a7'})

produce the same output (nothing), while only one of them did anything.

What is the reasoning why this was closed? I've read SERVER-1507 and none of the verboseShell options mentioned work:

> db.setVerboseShell()
Wed Nov 7 07:07:56 TypeError: db.setVerboseShell is not a function (shell):1
> setVerboseShell()
Wed Nov 7 07:08:22 ReferenceError: setVerboseShell is not defined (shell):1
> set verbose true
Wed Nov 7 07:08:58 SyntaxError: missing ; before statement (shell):1

Passing --verbose to mongo didn't help either.

Comment by Eliot Horowitz (Inactive) [ 16/Sep/11 ]

see SERVER-1507

Comment by Eliot Horowitz (Inactive) [ 16/Sep/11 ]

Don't think overall this is the right default

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