× Heads up!

Aqua Data Studio / nhilam

Follow
IDE for Relational Databases
×
anilkalshetti reported 2015-03-05T10:35:46Z  · last modified 2015-05-04T06:16:02Z

bulk.getOperations() command doesn't show result in ADS MongoShell


Dev
Emil Goicovici
emil.goicovici
QA
Jenny Nishimura
JennyNishimura
Priority Low
Complexity Unknown
Component MongoShell
Version 16.0

Aqua Data Studio 16.0.0-beta-39
Build #: 42698
Built on: 2015-Mar-04 06:28:30 PM          

OS: Ubuntu 14.04 LTS
Linux (3.13.0-32-generic, amd64) / UTF-8 / en / IN / Oracle Corporation 1.7.0_60-b19
Memory: Max=4,432,855,040;  Total=1,147,142,144;  Free=958,708,184;  CPUs=8

Database: MongoDB 3.0.0 
                  MongoDB 2.6-8

Issue: bulk.getOperations()  command doesn't show result in ADS MongoShell

Usecase: bulk.getOperations command is used to see the order of the operations.

Steps to reproduce the issue:
1. In ADS, Right click on MongoDB server, select Mongoshell.
2. In Mongoshell, run below queries.

use local;

var bulk = db.items.initializeUnorderedBulkOp();
bulk.insert( { _id: 1, item: "abc123", status: "A", soldQty: 5000 } );
bulk.insert( { _id: 2, item: "abc456", status: "A", soldQty: 150 } );
bulk.insert( { _id: 3, item: "abc789", status: "P", soldQty: 0 } );
bulk.execute( { w: "majority", wtimeout: 5000 } );

 

3. To see how the operations are grouped for a bulk operation execution, call bulk.getOperations() after the execution.
bulk.getOperations()

4. bulk.getOperations()    command  displays error message as below in ADS MongoShell
> bulk.getOperations()                                                                                                                                                                                             org.mozilla.javascript.NativeArray@36d415b4

 
 
@Dev:
1. Command is applicable to all MongoDB versions  [2.4 , 2.6 , 3.0] . Command doesn't show result for both ADSv15.0-14-6 and ADSv16-beta-39 latest builds.
Extra Info:  Ref. Link
- Bulk write operations can be either ordered or unordered.
- MongoDB 2.6 and above version support  New Bulk methods, which provide the ability to perform bulk insert, update, and remove operations.
   Previous version[2.4 and below] support only to perform bulk inserts.

Please refer screenshot1.png
Expected Result, As displayed on CLI of mongoshell:
 
> bulk.getOperations()
[
         { 
"originalZeroIndex" : 0,
"batchType" : 1,
"operations" : [
{
"_id" : 1,
"item" : "abc123",
"status" : "A",
"soldQty" : 5000
},
{
"_id" : 2,
"item" : "abc456",
"status" : "A",
"soldQty" : 150
},
{
"_id" : 3,
"item" : "abc789",
"status" : "P",
"soldQty" : 0
}
]
}
]
 

 

2 attachments

Issue #13120

Closed
Fixed
Resolved 2015-04-27T21:24:00Z
 
 
Completion
No due date
Fixed Build ADS-16.0.1
No time estimate

About AquaClusters Privacy Policy Support Version - 19.0.2-4 AquaFold, Inc Copyright © 2007-2017