Giter VIP home page Giter VIP logo

Comments (7)

ae-foster avatar ae-foster commented on August 15, 2024 1

Setting allkeys-lru or expiration times on top-level Redis keys could lead to inconsistency.

from datasketch.

ae-foster avatar ae-foster commented on August 15, 2024

This is not possible with the current implementation. In general, this would be challenging because it is not possible to set expiry on Redis hash child keys (according to SO at least - https://stackoverflow.com/questions/16545321/how-to-expire-the-hset-child-key-in-redis).

Check out https://github.com/ekzhu/datasketch/blob/master/datasketch/storage.py#L360 to see where the problems lie.

from datasketch.

SpandanThakur avatar SpandanThakur commented on August 15, 2024

@ae-foster Thanks for the information.

By inconsistencies in setting an allkeys-lru, do you mean that we would lose the hashes present in the top level Redis key? Or would end up with any other issues?

I am trying to keep my system resilient in case we do end up hitting max memory limits. I am not too concerned if we lose hashes we are trying to find similar matches with, in case we run into such an issue. But of course, I would definitely be concerned if the system itself stops running properly.

from datasketch.

ae-foster avatar ae-foster commented on August 15, 2024

Some of the values in Redis are other Redis keys. You could end up with a case where you look up the contents of a key (having read it as a value, e.g. by SMEMBERS), and find it (erroneously) empty because that key was deleted. Could cause unexpected behaviour!

from datasketch.

SpandanThakur avatar SpandanThakur commented on August 15, 2024

Thanks for the info.

from datasketch.

ekzhu avatar ekzhu commented on August 15, 2024

@SpandanThakur Maybe you can consider using the MongoDB storage @aastafiev is working on at #53? This should be able to utilize disk instead of keeping all data in memory.

from datasketch.

SpandanThakur avatar SpandanThakur commented on August 15, 2024

Sure @ekzhu , I will check out the pull.

from datasketch.

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.