mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 16:18:19 +00:00
Enable SQLite shared cache mode.
This allows all threads accessing the same database to share sqlite objects. This, for example, fixes the issue with several threads simultaneously writing to the same database file. See https://www.sqlite.org/sharedcache.html Addresses BIT-1325
This commit is contained in:
parent
697b59cdc8
commit
4968a5c654
4 changed files with 112 additions and 0 deletions
|
@ -120,6 +120,9 @@ bool SQLite::DoInit(const WriterInfo& info, int arg_num_fields,
|
|||
return false;
|
||||
}
|
||||
|
||||
// Allow connections to same DB to use single data/schema cache. Also allows simultaneous writes to one file.
|
||||
sqlite3_enable_shared_cache(1);
|
||||
|
||||
num_fields = arg_num_fields;
|
||||
fields = arg_fields;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue