-
Notifications
You must be signed in to change notification settings - Fork 26
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
Do not allow write with a DynamicTableRegion
index that is out of bounds
#210
Comments
I believe that check already exists right here: Lines 692 to 696 in 55dc7dd
Anytime |
We found a number of files from the DataJoint team that had this error and were unopenable in pynwb. I'm not sure how they managed to create these files in the first place with this check in place. I'm pretty sure they were using pynwb to write. Was this check recently added? As for files taking a long time to open, I think that is probably due to automatically dereferencing |
It’s reading one element at a time from the index—not the dereferenced data. I think these checks need to move elsewhere, and shouldn’t be enforced in setters. It makes maintenance and tracking of these sort of rules difficult, and creates performance issues. We probably need some sort of constraints layer to enforce these rules. |
We should do this for all DynamicTableRegions that are small enough (e.g., <10000 elements) and have that threshold (or the behavior) be configurable on write. It would be ideal to check this everytime a value is changed, but we cannot monitor all changes because we use numpy and h5py.dataset objects. A constraints layer would be nice, but for now, this can be done on write. |
Do not allow writing of a file with a
DynamicTableRegion
index that is out of bounds. The file is unreadable. Attempting to read it results in a cryptic error message (#209).The text was updated successfully, but these errors were encountered: