Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample Deletion is incomplete #25

Closed
danielplohmann opened this issue Nov 4, 2022 · 1 comment
Closed

Sample Deletion is incomplete #25

danielplohmann opened this issue Nov 4, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@danielplohmann
Copy link
Owner

When using the client's functionality to delete samples by function_id, the respective entries are not removed from the band_* collections. This means when candidates are generated, there will be dangling entries among them, which will lead to errors as these can not be resolved by their id.

Generally, if we have a broken state, we can fix it like this:

for entry in database["functions"].find():
    if entry["function_id"] - previous_id > 1:
        print("we have a gap here!")
        print(previous_id, entry["function_id"])
        for fid in range(previous_id + 1, entry["function_id"]):
            all_gap_function_ids.append(fid)
        break
    previous_id = entry["function_id"]

for band_number in range(0, 20):
    database[f"band_{band_number}"].update_many({},{"$pull": {"function_ids": {"$in": all_gap_function_ids }}})

As a result, we probably want to use the lower part to repair our method in MongoDbStorage to remove function_ids from band_* collections.

@danielplohmann danielplohmann added the bug Something isn't working label Nov 4, 2022
@danielplohmann
Copy link
Owner Author

fixed in f69b7b7.
Was actually a matter of missing information about how many bits should be used for interpretation per minhash signature field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant