Matthijs Douze
|
2d380e992b
|
Add manifold check for size 0 (#1867)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1867
Merging code for the 1T photodna index seems to fail at
https://www.internalfb.com/phabricator/paste/view/P412975011?lines=174
with
```
terminate called after throwing an instance of 'facebook::manifold::blobstore::StorageException'
what(): [400] Begin offset and/or length were invalid -- Begin offset must be positive and length must be non-negative. Received: offset = 2642410612, length = 0
Aborted (core dumped)
```
traces back to
https://www.internalfb.com/intern/diffusion/FBS/browsefile/master/fbcode/manifold/blobstore/BlobstoreThriftHandler.cpp?lines=671%2C700%2C732
There is a single case where we don't check if the read or write size is 0. So let's try this fix.
In the process I realized that the Manifold tests were non functional due to a name collision on common.py. Also fix this in all dependent files.
Differential Revision: D28231710
fbshipit-source-id: 700ffa6ca0c82c49e7d1eae9e76549ec5ff16332
|
2021-05-09 22:30:31 -07:00 |