Giter Club home page Giter Club logo

redis-rwlock's People

Contributors

e-chip avatar

Stargazers

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

Watchers

 avatar

redis-rwlock's Issues

Failed to import by go module

When running go build in my project, following error is shown:

go: finding github.com/e-chip/redis-rwlock latest
go: downloading github.com/e-chip/redis-rwlock v0.0.0-20191030182710-122e3f7ba621
build xxx: cannot load github.com/e-chip/redis-rwlock/v1: cannot find module providing package github.com/e-chip/redis-rwlock/v1

Failed to run go get with go module:

$ go get github.com/e-chip/redis-rwlock/v1
go: finding github.com/e-chip/redis-rwlock latest
go: downloading github.com/e-chip/redis-rwlock v0.0.0-20191030182710-122e3f7ba621
go get github.com/e-chip/redis-rwlock/v1: go.mod has post-v0 module path "github.com/e-chip/redis-rwlock/v1" at revision 122e3f7ba621

After reexamine with the go module documentation. There is a statement in the section of Semantic Import Versioning:

If the module is version v0 or v1, do not include the major version in either the module path or the import path.

Furthermore, the semver VCS tag is also required if you would like to support to get specific version by semver. (What happens if I create a go.mod but do not apply semver tags to my repository?)

read_lock_ref_count keys are leaked

Currently I use lock in web api to prevent concurrent requests for the same resource. Each resource is given unique GLOB_LOCK_KEY, READ_LOCK_REF_COUNT, and WRITER_LOCK_INTENT keys.

Nevertheless, I found READ_LOCK_REF_COUNT is not deleted when read unlock, and it is not set TTL. It is only deleted when requesting write lock.

In my case, write lock is necessary but rarely used. It makes redis full of unused READ_LOCK_REF_COUNT keys.

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.