Details
-
Bug
-
Resolution: Duplicate
-
Major - P3
-
None
-
2.4.1
-
None
-
Windows 2008 r2
-
ALL
-
Description
There seems to be unexpected results when running a js script from Windows. If a script like the attached is run from the shell, not all of the records will be inserted. There will be messages in higher verbosity logs indicating that a connection was forcibly closed:
Tue Apr 09 16:25:01.974 [conn1] insert gp.fleets ninserted:1 keyUpdates:0 locks(micros) w:13 0ms
|
Tue Apr 09 16:25:01.974 [conn1] insert gp.bases2 ninserted:1 keyUpdates:0 locks(micros) w:13 0ms
|
Tue Apr 09 16:25:01.989 [conn1] insert gp.fleets ninserted:1 keyUpdates:0 locks(micros) w:44 0ms
|
Tue Apr 09 16:25:01.989 [conn1] Socket recv() errno:10054 An existing connection was forcibly closed by the remote host. 127.0.0.1:49334
|
Tue Apr 09 16:25:01.989 [conn1] SocketException: remote: 127.0.0.1:49334 error: 9001 socket exception [1] server [127.0.0.1:49334]
|
Tue Apr 09 16:25:01.989 [conn1] end connection 127.0.0.1:49334 (0 connections now open)
|
But this may not be indicative of the problem.
Some unusual interactions are going on with the script. There will be an output for every item in the script, even if not all of them are inserted. If the print() operation is removed from the rp() function, the inserts will be completed successfully (. test2.js). If a print() command is added to the end of the script, the inserts will be completed successfully (test3.js). If a sleep() (even sleep(0)) is added to the rp() function, the inserts complete successfully (test4.js)
The same test1.js script when run from OSX to a mongod on OSX or Windows will see the inserts complete successfully.
Attachments
Issue Links
- duplicates
-
SERVER-7319 mongo shell should call getlasterror before terminating.
-
- Closed
-