GithubHelp home page GithubHelp logo

cubefs / cubefs-blobstore Goto Github PK

View Code? Open in Web Editor NEW
15.0 15.0 10.0 5.56 MB

BlobStore is a highly reliable,highly available and ultra-large scale distributed storage system.

License: Apache License 2.0

Makefile 0.06% Go 99.74% Shell 0.20%

cubefs-blobstore's Issues

blocking key deadlock problem

问题场景:

if kl == nil {
		l.lock.RUnlock()
		l.lock.Lock()
		kl = newBlocker(l.limit)
		l.keyMap[key] = kl
		kl.addRef()
		l.lock.Unlock()
  1. In a concurrent scenario, when aquire a single key, the obtained key maybe nil and no secondary check is performed, which may result in the same key being overwritten.
if kl.loadRef() < 0 {
			l.lock.Unlock()
			panic("internal error: refs < 0")
		}
		if kl.loadRef() == 0 {
			delete(l.keyMap, key)
		}
		kls = append(kls, kl)
	}
	for _, kl := range kls {
		kl.release()
	}
  1. When the key is released, there is a problem with the reference count judgment, resulting in the repeated release of the key's lock

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.