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:
Jon Siwek 2012-05-03 13:13:58 -05:00
parent 8766a2e2fc
commit bbac44a6a4
12 changed files with 104 additions and 11 deletions

View file

@ -170,6 +170,7 @@ extern double connection_status_update_interval;
extern StringVal* state_dir;
extern double state_write_delay;
extern int max_files_in_cache;
extern double log_rotate_interval;
extern double log_max_size;
extern RecordType* rotate_info;