Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
On examination, I think there's no real reason for this to be multithreaded in the first place. Relative to des regeneration (which isn't threaded), db regeneration/loading is quite fast, and I didn't see a major time savings either way even for just db initialization. For the record, I'm 80% sure that the sporadic db init bugs that led to 2e17027 and d00fd6f were caused by the following: crawl would spawn multiple threads even if sqlite was configured or if databases were opened in single threading mode, in which case there was of course no thread safety. The code that opened the database was also entirely implicit about which threading mode to use. By forcing single-threading mode in sqlite I could replicate the exact reported behavior (random failures to build the db about 20% of the time) on my OS X build, so I suspect that the problem may have been caused by people accidentally linking against a sqlite version that had single threading by default. If anyone ever wants to resurrect a multi-threaded version of this, I recommend explicitly doing something like: `sqlite3_config(SQLITE_CONFIG_SERIALIZED);` before spawning any threads. There's an equivalent parameter you can pass when opening a database, as well.
- Loading branch information