mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 18:18:19 +00:00
Changes to open-file caching limits and uncached file unserialization.
- Unserializing files that were previously kicked out of the open-file cache would cause them to be fopen'd with the original access permissions which is usually 'w' and causes truncation. They are now opened in 'a' mode. (addresses #780) - Add 'max_files_in_cache' script option to manually set the maximum amount of opened files to keep cached. Mainly this just helped to create a simple test case for the above change. - Remove unused NO_HAVE_SETRLIMIT preprocessor switch. - On systems that don't enforce a limit on number of files opened for the process, raise default max size of open-file cache from 32 to 512.
This commit is contained in:
parent
8766a2e2fc
commit
bbac44a6a4
12 changed files with 104 additions and 11 deletions
|
@ -167,6 +167,7 @@ TableVal* preserve_orig_addr;
|
|||
TableVal* preserve_resp_addr;
|
||||
TableVal* preserve_other_addr;
|
||||
|
||||
int max_files_in_cache;
|
||||
double log_rotate_interval;
|
||||
double log_max_size;
|
||||
RecordType* rotate_info;
|
||||
|
@ -257,6 +258,7 @@ void init_general_global_var()
|
|||
state_dir = internal_val("state_dir")->AsStringVal();
|
||||
state_write_delay = opt_internal_double("state_write_delay");
|
||||
|
||||
max_files_in_cache = opt_internal_int("max_files_in_cache");
|
||||
log_rotate_interval = opt_internal_double("log_rotate_interval");
|
||||
log_max_size = opt_internal_double("log_max_size");
|
||||
rotate_info = internal_type("rotate_info")->AsRecordType();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue