Git Product home page Git Product logo

Comments (4)

simonbasle avatar simonbasle commented on August 14, 2024

it definitely shouldn't decrease the acquired counter, and that by itself is a bug.

however, I don't know if it should be allowed to invalidate() at all in this case. if the resource is idle/has been released, it means the caller has relinquished control of the resource back to the pool. further release() and invalidate() calls should be no-op at that point, shouldn't they?

from reactor-pool.

violetagg avatar violetagg commented on August 14, 2024

@simonbasle let say that you use a connection for a given request (HTTP) then you return this connection to the pool, meanwhile the connection is closed. If we cannot invalidate the resource as it is not usable anymore, the resource will stay in the pool until there is an acquire operation that will remove it from the pool, however that acquire operation may happen at any time in the next seconds or the next hour. On the other hand may be we can utilise the background cleanup.

from reactor-pool.

simonbasle avatar simonbasle commented on August 14, 2024

Yeah I understand, but that's why we added background eviction.

From a glance at the codebase, the assumption that invalidate() is NO-OP after release() is there throughout the code. You shouldn't hold to a PooledRef after having called either of its release() and invalidate() method.

That is a far wider change with potential breaking implications 😞

from reactor-pool.

violetagg avatar violetagg commented on August 14, 2024

yeah, closing

from reactor-pool.

Related Issues (20)

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.