Description
In testing, with vvvvv logging, a user noticed these in their log:
Wed Nov 9 13:45:26 [conn4] insert test.in1 0ms
|
Wed Nov 9 13:45:26 [conn4] Socket recv() conn closed? 127.0.0.1:33555
|
Wed Nov 9 13:45:26 [conn4] SocketException: remote: 127.0.0.1:33555
|
error: 9001 socket exception [0] server [127.0.0.1:33555]
|
Wed Nov 9 13:45:26 [conn4] end connection 127.0.0.1:33555
|
Wed Nov 9 13:45:26 [conn6] insert test.in1 0ms
|
This was generated with a short script that just inserts documents in a loop:
db = db.getSiblingDB('techjam');
|
|
|
for(i = 0; i < 100000; ++i) {
|
db.tc.save({a:i});
|
}
|
If you load() the script from inside the shell, you don't get the broken sockets. But if you run the script by specifying it on the command line, then the shell exits so fast that the server gets the error message above. We should add a final getLastError() before exiting the shell in this mode so that we don't get these, because the tester believed they were being disconnected and data was being dropped on the floor, even though it wasn't.