pixelogik / NearPy

Python framework for fast (approximated) nearest neighbour search in large, high-dimensional data sets using different locality-sensitive hashes.
MIT License
759 stars 152 forks source link

Delete vector from redis storage #58

Closed amorgun closed 7 years ago

amorgun commented 7 years ago

What I've done in this PR: 1) Implemented vector deletion for RedisStorage. It involves some black magic so it would be great if somebody review it. 2) Added some new tests and fixed some old ones. 3) Fixed a bug in RedisStorage where we retrieve false-ish data e.g. zero and empty lists as None. 4) Changed test runner. I have no idea why @akabos in #40 decided to use subprocess module for calling pytest, but it didn't work on Windows for me. This PR includes changes from #57.

amorgun commented 7 years ago

I just want to point out that we can get races when inserting and deleting simultaneously. We could get it before using inserting and storage cleaning. The problem is that we need to get list of keys before updating. Some more magic with WATCH can be added for solving these problems.

adityapatadia commented 7 years ago

Is this PR good to merge? Properly tested? I am planning to merge all PRs.

amorgun commented 7 years ago

In this PR I added some tests and they all are passing. I have described my concerns at the comment above, and they are still actual. Anyway, I think you can merge it.