Bookworm-project / BookwormDB

Tools for text tokenization and encoding
MIT License
84 stars 12 forks source link

Supplementing metadata should overwrite tables #74

Closed bmschmidt closed 8 years ago

bmschmidt commented 9 years ago

Currently, if you run a supplementMetadataFromJSON (or from TSV) command with fields that are already defined, the cached versions in memory persist, which can cause errors.

Running python OneClick.py reloadMemory fixes the problem; but this can be expensive on a very large bookworm (several minutes before complete, although the database should remain usable in the meantime), and only a few tables actually need to be reloaded (those affected by the command).

The supplement command should therefore run the code to update the memory tables in a way that forces reload, rather than accepting a populated table as adequate.

bmschmidt commented 8 years ago

Fully fixed as of https://github.com/Bookworm-project/BookwormDB/commit/280c733c2b9dabd6910fbd543e3f1622c518d920