Code Monkey home page Code Monkey logo

cloudab's People

Contributors

gaocegege avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cloudab's Issues

[question] Unexpected mongodb connections using go-mongo-driver

Ref https://jira.mongodb.org/browse/GODRIVER-1884
Ref https://jira.mongodb.org/browse/GODRIVER-1883
Ref https://jira.mongodb.org/browse/GODRIVER-1833

Hi 策 高, thank you for the report!

That sounds like expected behavior. A fixed number of connections are created per server for monitoring. This is in addition to >the connections created for application use (which is dictated by MinPoolSize and MaxPoolSize).

For Go driver 1.4.0+ there are a fixed 2 monitoring connections per server.
For Go driver < 1.4.0 there is a fixed 1 monitoring connection per server.

When initializing the client with default configs, there is more than 1 connection (sometimes 2, sometimes 3) to the specific server.

If no MaxPoolSize was specified, the default MaxPoolSize is 100. And application connections are created as needed. The higher >rate of concurrent operations, the more application connections will be created, capping at MaxPoolSize.

When I set the MaxPoolSize to 2 and MinPoolSize to 2, I got 4 connections which are also unexpected.

If you are connecting to one server, since there are two monitoring connections, that is expected.

Sincerely,
Kevin

[feature] Maintain maphash fork to avoid initSeed in Sum64

We do not want to initSeed in Sum64.

// Sum64 returns h's current 64-bit value, which depends on
// h's seed and the sequence of bytes added to h since the
// last call to Reset or SetSeed.
//
// All bits of the Sum64 result are close to uniformly and
// independently distributed, so it can be safely reduced
// by using bit masking, shifting, or modular arithmetic.
func (h *Hash) Sum64() uint64 {
	h.initSeed()
	return rthash(h.buf[:h.n], h.state.s)
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.