[SERVER-35393] Go Driver Unit Tests receive error code 9001 when doing a large insert many Created: 04/Jun/18  Updated: 29/Oct/23  Resolved: 11/Jan/19

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.0.6, 4.1.7

Type: Bug Priority: Major - P3
Reporter: Kristofer Brandow (Inactive) Assignee: Sara Golemon
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.0
Steps To Reproduce:
  1. Clone the Go driver (this bug has been reproduced using commit aa7785b39743c6e7c034dc5b25d9a6f84cdd0785)
  2. Spin up a sharded cluster with SSL and Auth. There is a CA certificate under the data/certificates directory that can be used. This bug was reproduced on the 4.0.0-rc1 release of mongodb.
  3. cd into the mongo directory of the Go driver
  4. Run go test (replace the username and password in the MONGODB_URI):

    MONGO_GO_DRIVER_CA_FILE=~/src/github.com/mongodb/mongo-go-driver/data/certificates/ca.pem AUTH=auth TOPOLOGY=sharded_cluster SSL=ssl MONGODB_URI=mongodb://[username]:[password]@localhost:27017 EVR_TASK_ID=12345 go test -v -run "TestCollection_InsertMany_Batches"
    

  5. The error in the description should be returned.
Sprint: Security 2018-10-08, Security 2018-10-22, Security 2018-11-05, Security 2018-11-19, Security 2018-12-03, Security 2018-12-17, Security 2018-12-31, Security 2019-01-14
Participants:
Linked BF Score: 0

 Description   

When running the TestCollection_InsertMany_Batches unit test the Go driver returns the following error:

mongo.BulkWriteError{WriteErrors:mongo.WriteErrors{mongo.WriteError{Index:0, Code:9001, Message:"Write results unavailable from localhost:27026 :: caused by :: asio.ssl stream truncated"}}, WriteConcernError:(*mongo.WriteConcernError)(nil)}

This only occurs when for that test and the remainder of the tests pass. This only occurs on macOS.



 Comments   
Comment by Githook User [ 18/Jan/19 ]

Author:

{'username': 'sgolemon', 'email': 'sara.golemon@mongodb.com', 'name': 'Sara Golemon'}

Message: SERVER-35393 Flush asio output and limit SecureTransport out buffer

(cherry picked from commit 573ebb251784aa7665b978ca386b60799d74c878)
Branch: v4.0
https://github.com/mongodb/mongo/commit/785e8eaba42b3cafb4f1da227fea706cd5b172b7

Comment by Kristofer Brandow (Inactive) [ 11/Jan/19 ]

Just tested a patch with this and it fixes both the issue we raised and another issue that just came up. 

Comment by Githook User [ 11/Jan/19 ]

Author:

{'username': 'sgolemon', 'email': 'sara.golemon@mongodb.com', 'name': 'Sara Golemon'}

Message: SERVER-35393 Flush asio output and limit SecureTransport out buffer
Branch: master
https://github.com/mongodb/mongo/commit/573ebb251784aa7665b978ca386b60799d74c878

Comment by Githook User [ 03/Jan/19 ]

Author:

{'username': 'sgolemon', 'email': 'sara.golemon@mongodb.com', 'name': 'Sara Golemon'}

Message: Revert "SERVER-35393 Flush output buffer before attempting new writes"

This reverts commit 99ac27f83e67aca7e9244c3aadb3026492e45da3.
Branch: master
https://github.com/mongodb/mongo/commit/f27c375287f7c69067d5ba437533622dbecf41c9

Comment by Githook User [ 14/Dec/18 ]

Author:

{'username': 'sgolemon', 'email': 'sara.golemon@mongodb.com', 'name': 'Sara Golemon'}

Message: SERVER-35393 Flush output buffer before attempting new writes
Branch: master
https://github.com/mongodb/mongo/commit/99ac27f83e67aca7e9244c3aadb3026492e45da3

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