Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partial 4.0 transaction support #276

Closed
wants to merge 33 commits into from
Closed

Partial 4.0 transaction support #276

wants to merge 33 commits into from

Commits on Feb 13, 2018

  1. socket: only send client metadata once per socket (#105)

    Periodic cluster synchronisation calls isMaster() which currently resends the
    "client" metadata every call - the spec specifies:
    
    	isMaster commands issued after the initial connection handshake MUST NOT
    	contain handshake arguments
    
    	https://github.com/mongodb/specifications/blob/master/source/mongodb-handshake/handshake.rst#connection-handshake
    
    This hotfix prevents subsequent isMaster calls from sending the client metadata
    again - fixes #101 and fixes #103.
    
    Thanks to @changwoo-nam @qhenkart @canthefason @jyoon17 for spotting the initial
    issue, opening tickets, and having the problem debugged with a PoC fix before I
    even woke up.
    domodwyer authored Feb 13, 2018
    Configuration menu
    Copy the full SHA
    9be26bd View commit details
    Browse the repository at this point in the history

Commits on Feb 20, 2018

  1. Merge Development (#111)

    * Brings in a patch on having flusher not suppress errors. (#81)
    
    go-mgo#360
    
    * Fallback to JSON tags when BSON tag isn't present (#91)
    
    * Fallback to JSON tags when BSON tag isn't present
    
    
    Cleanup.
    
    * Add test to demonstrate tagging fallback.
    
    - Test coverage for tagging test.
    
    * socket: only send client metadata once per socket
    
    Periodic cluster synchronisation calls isMaster() which currently resends the
    "client" metadata every call - the spec specifies:
    
    	isMaster commands issued after the initial connection handshake MUST NOT
    	contain handshake arguments
    
    	https://github.com/mongodb/specifications/blob/master/source/mongodb-handshake/handshake.rst#connection-handshake
    
    This hotfix prevents subsequent isMaster calls from sending the client metadata
    again - fixes #101 and fixes #103.
    
    Thanks to @changwoo-nam @qhenkart @canthefason @jyoon17 for spotting the initial
    issue, opening tickets, and having the problem debugged with a PoC fix before I
    even woke up.
    
    * Cluster abended test 254 (#100)
    
    * Add a test that mongo Server gets their abended reset as necessary.
    
    See https://github.com/go-mgo/mgo/issues/254 and
    https://github.com/go-mgo/mgo/pull/255/files
    
    * Include the patch from Issue 255.
    
    This brings in a test which fails without the patch, and passes with the
    patch. Still to be tested, manual tcpkill of a socket.
    
    * changeStream support (#97)
    
    Add $changeStream support
    
    * readme: credit @peterdeka and @steve-gray (#110)
    domodwyer authored Feb 20, 2018
    Configuration menu
    Copy the full SHA
    baa28fc View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2018

  1. Hotfix #120 (#136)

    * cluster: fix deadlock in cluster synchronisation (#120)
    
    For a impressively thorough breakdown of the problem, see:
    	#120 (comment)
    
    Huge thanks to @dvic and @KJTsanaktsidis for the report and fix.
    
    * readme: credit @dvic and @KJTsanaktsidis
    domodwyer authored Apr 3, 2018
    Configuration menu
    Copy the full SHA
    f76e4f9 View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2018

  1. Configuration menu
    Copy the full SHA
    7a53c79 View commit details
    Browse the repository at this point in the history

Commits on Apr 24, 2018

  1. Merge pull request #152 from globalsign/release/r2018.04.23

    Release/r2018.04.23
    domodwyer authored Apr 24, 2018
    Configuration menu
    Copy the full SHA
    efe0945 View commit details
    Browse the repository at this point in the history

Commits on Jun 15, 2018

  1. Release/r2018.06.15 (#191)

    * allow ptr in inline structs
    
    * inline pointer_to_struce mode: update comments. return error on pointer not to struct
    
    * fix(dbtest): Use os.Kill on windows instead of Interrupt 🐛
    
    I've added a use for os.Kill, instead of os.Interrupt signal, when using
    Windows. I'm current developing my project on Windows, and using
    DBServer.Stop() was resulting in: "timeout waiting for mongod process to
    die". After investigating, I've discovered that os.Interrupt isn't
    implemented on Windows, and it seems golang has Frozen this issue due to
    age (2013). They instruct to use os.Kill instead. Using this, the
    DBServer on my project works with no problem.
    
    * Respect nil slices, maps in bson encoder (#147)
    
    * socket: only send client metadata once per socket (#105)
    
    Periodic cluster synchronisation calls isMaster() which currently resends the
    "client" metadata every call - the spec specifies:
    
    	isMaster commands issued after the initial connection handshake MUST NOT
    	contain handshake arguments
    
    	https://github.com/mongodb/specifications/blob/master/source/mongodb-handshake/handshake.rst#connection-handshake
    
    This hotfix prevents subsequent isMaster calls from sending the client metadata
    again - fixes #101 and fixes #103.
    
    Thanks to @changwoo-nam @qhenkart @canthefason @jyoon17 for spotting the initial
    issue, opening tickets, and having the problem debugged with a PoC fix before I
    even woke up.
    
    * Merge Development (#111)
    
    * Brings in a patch on having flusher not suppress errors. (#81)
    
    go-mgo#360
    
    * Fallback to JSON tags when BSON tag isn't present (#91)
    
    * Fallback to JSON tags when BSON tag isn't present
    
    
    Cleanup.
    
    * Add test to demonstrate tagging fallback.
    
    - Test coverage for tagging test.
    
    * socket: only send client metadata once per socket
    
    Periodic cluster synchronisation calls isMaster() which currently resends the
    "client" metadata every call - the spec specifies:
    
    	isMaster commands issued after the initial connection handshake MUST NOT
    	contain handshake arguments
    
    	https://github.com/mongodb/specifications/blob/master/source/mongodb-handshake/handshake.rst#connection-handshake
    
    This hotfix prevents subsequent isMaster calls from sending the client metadata
    again - fixes #101 and fixes #103.
    
    Thanks to @changwoo-nam @qhenkart @canthefason @jyoon17 for spotting the initial
    issue, opening tickets, and having the problem debugged with a PoC fix before I
    even woke up.
    
    * Cluster abended test 254 (#100)
    
    * Add a test that mongo Server gets their abended reset as necessary.
    
    See https://github.com/go-mgo/mgo/issues/254 and
    https://github.com/go-mgo/mgo/pull/255/files
    
    * Include the patch from Issue 255.
    
    This brings in a test which fails without the patch, and passes with the
    patch. Still to be tested, manual tcpkill of a socket.
    
    * changeStream support (#97)
    
    Add $changeStream support
    
    * readme: credit @peterdeka and @steve-gray (#110)
    
    * Hotfix #120  (#136)
    
    * cluster: fix deadlock in cluster synchronisation (#120)
    
    For a impressively thorough breakdown of the problem, see:
    	#120 (comment)
    
    Huge thanks to @dvic and @KJTsanaktsidis for the report and fix.
    
    * readme: credit @dvic and @KJTsanaktsidis
    
    * added support for marshalling/unmarshalling maps with non-string keys
    
    * refactor method receiver
    
    * added support for json-compatible support for slices and maps Marshal() func: nil slice or map converts to nil, not empty (initialized with len=0)
    
    * fix IsNil on slices and maps
    
    format
    
    * added godoc
    
    * fix sasl empty payload
    
    * fix scram-sha-1 auth
    
    * revert fix sasl empty payload
    
    * Separate read/write network timeouts (#161)
    
    * socket: separate read/write network timeouts
    
    Splits DialInfo.Timeout (defaults to 60s when using mgo.Dial()) into ReadTimeout
    and WriteTimeout to address #160. Read/write timeout defaults to
    DialInfo.Timeout to preserve existing behaviour.
    
    * cluster: remove AcquireSocket
    
    Only used by tests, replaced by the pool-aware acquire socket functions:
    	* AcquireSocketWithPoolTimeout
    	* AcquireSocketWithBlocking
    
    * cluster: use configured timeouts for cluster operations
    
    * `mongoCluster.syncServer()` no longer uses hard-coded 5 seconds
    * `mongoCluster.isMaster()` no longer uses hard-coded 10 seconds
    
    * tests: use DialInfo for internal timeouts
    
    * server: fix fantastic serverTags nil slice bug
    
    When unmarshalling serverTags, it is now an empty slice, instead of a nil slice.
    
    `len(thing) == 0` works all the time, regardless.
    
    * cluster: remove unused duplicate pool config
    
    * session: avoid calculating default values in hot path
    
    Changes `DialWithInfo` to handle setting default values by setting the relevant
    `DialInfo` field, rather than calling the respective methods in the hot path for:
    
    	* `PoolLimit`
    	* `ReadTimeout`
    	* `WriteTimeout`
    
    * session: remove unused consts
    
    * session: update docs
    
    * add URI options: "w", "j", "wtimeoutMS" (#162)
    
    * add URI options: "w", "j", "wtimeoutMS"
    
    * change "w" to "j"
    
    * Add Collation support for calling Count() on a Query (#166)
    
    * Expand documentation for *Iter.Next (#163)
    
    The documentation now explains the difference between calling Err and
    Close after Next returns false.
    
    The example code has been expanded to include checking for timeout.
    
    * add NewMongoTimestamp() and MongoTimestamp.Time(),Counter() (#171)
    
    code is inspired by go-mgo#202
    
    * MGO-156 Avoid iter.Next deadlock on dead sockets (#182)
    
    * Allow passing slice pointer as an interface pointer to Iter.All (#181)
    
    * socket: only send client metadata once per socket (#105)
    
    Periodic cluster synchronisation calls isMaster() which currently resends the
    "client" metadata every call - the spec specifies:
    
    	isMaster commands issued after the initial connection handshake MUST NOT
    	contain handshake arguments
    
    	https://github.com/mongodb/specifications/blob/master/source/mongodb-handshake/handshake.rst#connection-handshake
    
    This hotfix prevents subsequent isMaster calls from sending the client metadata
    again - fixes #101 and fixes #103.
    
    Thanks to @changwoo-nam @qhenkart @canthefason @jyoon17 for spotting the initial
    issue, opening tickets, and having the problem debugged with a PoC fix before I
    even woke up.
    
    * Merge Development (#111)
    
    * Brings in a patch on having flusher not suppress errors. (#81)
    
    go-mgo#360
    
    * Fallback to JSON tags when BSON tag isn't present (#91)
    
    * Fallback to JSON tags when BSON tag isn't present
    
    
    Cleanup.
    
    * Add test to demonstrate tagging fallback.
    
    - Test coverage for tagging test.
    
    * socket: only send client metadata once per socket
    
    Periodic cluster synchronisation calls isMaster() which currently resends the
    "client" metadata every call - the spec specifies:
    
    	isMaster commands issued after the initial connection handshake MUST NOT
    	contain handshake arguments
    
    	https://github.com/mongodb/specifications/blob/master/source/mongodb-handshake/handshake.rst#connection-handshake
    
    This hotfix prevents subsequent isMaster calls from sending the client metadata
    again - fixes #101 and fixes #103.
    
    Thanks to @changwoo-nam @qhenkart @canthefason @jyoon17 for spotting the initial
    issue, opening tickets, and having the problem debugged with a PoC fix before I
    even woke up.
    
    * Cluster abended test 254 (#100)
    
    * Add a test that mongo Server gets their abended reset as necessary.
    
    See https://github.com/go-mgo/mgo/issues/254 and
    https://github.com/go-mgo/mgo/pull/255/files
    
    * Include the patch from Issue 255.
    
    This brings in a test which fails without the patch, and passes with the
    patch. Still to be tested, manual tcpkill of a socket.
    
    * changeStream support (#97)
    
    Add $changeStream support
    
    * readme: credit @peterdeka and @steve-gray (#110)
    
    * Hotfix #120  (#136)
    
    * cluster: fix deadlock in cluster synchronisation (#120)
    
    For a impressively thorough breakdown of the problem, see:
    	#120 (comment)
    
    Huge thanks to @dvic and @KJTsanaktsidis for the report and fix.
    
    * readme: credit @dvic and @KJTsanaktsidis
    
    * Allow passing slice pointer as an interface pointer to Iter.All
    
    * Reverted to original error message, added test case for interface{} ptr
    
    * Contributing:findAndModify support writeConcern (#185)
    
    * socket: only send client metadata once per socket (#105)
    
    Periodic cluster synchronisation calls isMaster() which currently resends the
    "client" metadata every call - the spec specifies:
    
    	isMaster commands issued after the initial connection handshake MUST NOT
    	contain handshake arguments
    
    	https://github.com/mongodb/specifications/blob/master/source/mongodb-handshake/handshake.rst#connection-handshake
    
    This hotfix prevents subsequent isMaster calls from sending the client metadata
    again - fixes #101 and fixes #103.
    
    Thanks to @changwoo-nam @qhenkart @canthefason @jyoon17 for spotting the initial
    issue, opening tickets, and having the problem debugged with a PoC fix before I
    even woke up.
    
    * Merge Development (#111)
    
    * Brings in a patch on having flusher not suppress errors. (#81)
    
    go-mgo#360
    
    * Fallback to JSON tags when BSON tag isn't present (#91)
    
    * Fallback to JSON tags when BSON tag isn't present
    
    
    Cleanup.
    
    * Add test to demonstrate tagging fallback.
    
    - Test coverage for tagging test.
    
    * socket: only send client metadata once per socket
    
    Periodic cluster synchronisation calls isMaster() which currently resends the
    "client" metadata every call - the spec specifies:
    
    	isMaster commands issued after the initial connection handshake MUST NOT
    	contain handshake arguments
    
    	https://github.com/mongodb/specifications/blob/master/source/mongodb-handshake/handshake.rst#connection-handshake
    
    This hotfix prevents subsequent isMaster calls from sending the client metadata
    again - fixes #101 and fixes #103.
    
    Thanks to @changwoo-nam @qhenkart @canthefason @jyoon17 for spotting the initial
    issue, opening tickets, and having the problem debugged with a PoC fix before I
    even woke up.
    
    * Cluster abended test 254 (#100)
    
    * Add a test that mongo Server gets their abended reset as necessary.
    
    See https://github.com/go-mgo/mgo/issues/254 and
    https://github.com/go-mgo/mgo/pull/255/files
    
    * Include the patch from Issue 255.
    
    This brings in a test which fails without the patch, and passes with the
    patch. Still to be tested, manual tcpkill of a socket.
    
    * changeStream support (#97)
    
    Add $changeStream support
    
    * readme: credit @peterdeka and @steve-gray (#110)
    
    * Hotfix #120  (#136)
    
    * cluster: fix deadlock in cluster synchronisation (#120)
    
    For a impressively thorough breakdown of the problem, see:
    	#120 (comment)
    
    Huge thanks to @dvic and @KJTsanaktsidis for the report and fix.
    
    * readme: credit @dvic and @KJTsanaktsidis
    
    * findAndModify support writeConcern
    
    * fix
    
    * readme: credit everyone (#187)
    
    * @cedric-cordenier
    * @DaytonG
    * @ddspog
    * @gedge
    * @jefferickson
    * @larrycinnabar
    * @Mei-Zhao
    * @roobre
    
    * revert: MGO-156 Avoid iter.Next deadlock on dead sockets (#182) (#188)
    
    This reverts commit 7253b2b.
    
    * Add support for ssl dial string (#184)
    
    * Add support for ssl dial string
    
    * Ensure we dont override user settings
    
    * update examples
    
    * update ssl value parsing
    
    * PingSsl test
    
    * skip test requiring system certificates
    
    * readme: credit @tbruyelle (#190)
    domodwyer authored Jun 15, 2018
    Configuration menu
    Copy the full SHA
    113d396 View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2018

  1. Configuration menu
    Copy the full SHA
    901e8cf View commit details
    Browse the repository at this point in the history

Commits on Aug 21, 2018

  1. Merge pull request #241 from rickypai/patch-1

    Test against Mongo minor releases updates as of Aug 2018
    maitesin authored Aug 21, 2018
    Configuration menu
    Copy the full SHA
    46bcd34 View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2018

  1. Configuration menu
    Copy the full SHA
    20c16b2 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #255 from globalsign/revert-241-patch-1

    Revert "Test against Mongo minor releases updates as of Aug 2018"
    eminano authored Aug 28, 2018
    Configuration menu
    Copy the full SHA
    6f9f54a View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2018

  1. github: add issue template

    domodwyer committed Sep 5, 2018
    Configuration menu
    Copy the full SHA
    d82ba02 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a913faa View commit details
    Browse the repository at this point in the history
  3. Merge pull request #263 from globalsign/feature/issue-template-suppor…

    …ted-versions
    
    Issue template and MongoDB supported versions
    domodwyer authored Sep 5, 2018
    Configuration menu
    Copy the full SHA
    1ca0a4f View commit details
    Browse the repository at this point in the history

Commits on Sep 18, 2018

  1. Configuration menu
    Copy the full SHA
    967f2ee View commit details
    Browse the repository at this point in the history

Commits on Sep 19, 2018

  1. Configuration menu
    Copy the full SHA
    0e31f69 View commit details
    Browse the repository at this point in the history
  2. Add initial documentation.

    thdrmiller committed Sep 19, 2018
    Configuration menu
    Copy the full SHA
    a4ebf50 View commit details
    Browse the repository at this point in the history
  3. "Fix" some testing stuff.

    Specifically, there are about a bajillion mentions of "M" instead of "bson.M".  I don't really understand why and they were breaking everything.  There's probably some alias somewhere I was missing but I just changed them to bson.M.
    
    Tests are still failing, though, and that's probably related to some changes I had to make to enable a single-server replica in dbtest.  I'll make that optional - it also slows stuff down when we don't need it.
    thdrmiller committed Sep 19, 2018
    Configuration menu
    Copy the full SHA
    13b68da View commit details
    Browse the repository at this point in the history
  4. Revert previous "Fix".

    Turns out M is defined in another file, but because of an incorrect testing configuration on my side, the syntax checker
    wasn't picking it up.  After moving some stuff around, it all works.
    
    A couple of tests fail but I'm pretty confident that this is because I'm testing on a mac.
    thdrmiller committed Sep 19, 2018
    Configuration menu
    Copy the full SHA
    20cdbeb View commit details
    Browse the repository at this point in the history
  5. Add support for replication in dbtest.

    Change is backwards compatible - to use replication support, start with SessionRepl(true) rather than Session() - Session()
    is the legacy behavior.
    thdrmiller committed Sep 19, 2018
    Configuration menu
    Copy the full SHA
    3c7d50e View commit details
    Browse the repository at this point in the history
  6. Documentation enhancement

    thdrmiller committed Sep 19, 2018
    Configuration menu
    Copy the full SHA
    f087ba9 View commit details
    Browse the repository at this point in the history
  7. Modify transaction object to be unexported.

    Add ability to set autocommit from the "constructor"
    Improve documentation.
    thdrmiller committed Sep 19, 2018
    Configuration menu
    Copy the full SHA
    6744aea View commit details
    Browse the repository at this point in the history
  8. Fix setup script to accept a SED environment variable. MACOS sed does…

    … not work with it.
    
    Also a few other minor fixes to get tests to working correctly.
    Started adding tests for transaction code.
    thdrmiller committed Sep 19, 2018
    Configuration menu
    Copy the full SHA
    e9c36a2 View commit details
    Browse the repository at this point in the history

Commits on Sep 20, 2018

  1. Fixed a few more tests.

    thdrmiller committed Sep 20, 2018
    Configuration menu
    Copy the full SHA
    43d81ad View commit details
    Browse the repository at this point in the history

Commits on Sep 21, 2018

  1. Revert some more changes to session_test. Realized that the developme…

    …nt branch contains much of what we want to do, so going to merge that next.
    thdrmiller committed Sep 21, 2018
    Configuration menu
    Copy the full SHA
    0617b1e View commit details
    Browse the repository at this point in the history
  2. Merge remote-tracking branch 'remotes/origin/development'

    # Conflicts:
    #	README.md
    #	auth_test.go
    #	cluster.go
    #	dbtest/dbserver.go
    #	server.go
    #	server_test.go
    #	session.go
    #	session_internal_test.go
    #	session_test.go
    #	socket.go
    
    Also fix a few bugs found now that testing seems to actually work some of the time.
    thdrmiller committed Sep 21, 2018
    Configuration menu
    Copy the full SHA
    826ec4e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    31da02d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9c29717 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    a0402aa View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    87bd67f View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2018

  1. Configuration menu
    Copy the full SHA
    d4e4ad8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1a34682 View commit details
    Browse the repository at this point in the history
  3. Remove extra brackets. They work on MacOS, but the upstream Travis-CI…

    … doesn't work with them.
    thdrmiller committed Sep 25, 2018
    Configuration menu
    Copy the full SHA
    80af33d View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2018

  1. Configuration menu
    Copy the full SHA
    f9dc25e View commit details
    Browse the repository at this point in the history