Aristarkh Zagorodnikov avatar Aristarkh Zagorodnikov committed 3912c41

Removed GridFSPoolSize completely

Comments (0)

Files changed (1)

gridfs/mod_gridfs.cpp

 	extern module AP_MODULE_DECLARE_DATA gridfs_module;
 }
 
-//	Default GridFS pool size
-const int DEFAULT_GFS_POOL_SIZE = 16;
-
 //	Default cache max age in seconds
 const int DEFAULT_CACHE_MAX_AGE = 604800;
 
 //	Default connect timeout in seconds
 const int DEFAULT_CONNECT_TIMEOUT = 5;
 
-//	Maximum GridFS pool size
-const int MAX_GFS_POOL_SIZE = 1024;
-
 //	Maximum cache age in seconds
 const int MAX_CACHE_MAX_AGE = 86400 * 365 * 10;
 
 {
 	mongo::ConnectionString* connection_string;
 	const char* db_name;
-	int gfs_pool_size;
-	int gfs_pool_size_set;
 	int cache_max_age;
 	int cache_max_age_set;
 	int connect_timeout;
     gridfs_config* config = (gridfs_config*)apr_pcalloc(pool, sizeof(gridfs_config));
     if (!config)
     	return 0;
-    config->gfs_pool_size = DEFAULT_GFS_POOL_SIZE;
    	config->cache_max_age = DEFAULT_CACHE_MAX_AGE;
     config->connect_timeout = DEFAULT_CONNECT_TIMEOUT;
     return config;
     gridfs_config *add = (gridfs_config*) addv;
     config->db_name = add->db_name ? add->db_name : base->db_name;
     config->connection_string = add->connection_string ? add->connection_string : base->connection_string;
-    config->gfs_pool_size = add->gfs_pool_size_set ? add->gfs_pool_size : base->gfs_pool_size;
-    config->gfs_pool_size_set = add->gfs_pool_size_set | base->gfs_pool_size_set;
     config->cache_max_age = add->cache_max_age_set ? add->cache_max_age : base->cache_max_age;
     config->cache_max_age_set = add->cache_max_age_set | base->cache_max_age_set;
     config->connect_timeout = add->connect_timeout_set ? add->connect_timeout : base->connect_timeout;
     return 0;
 }
 
-//	Handles "GridFSPoolSize <pool size>" command
-static const char* gridfs_pool_size_command(cmd_parms* command, void* module_config, const char* argument)
-{
-    gridfs_config* config = (gridfs_config*)module_config;
-    int size = atoi(argument);
-    if (size <= 0 || size > MAX_GFS_POOL_SIZE)
-    	return "pool size out of range";
-    config->gfs_pool_size = size;
-    config->gfs_pool_size_set = 1;
-    return 0;
-}
-
 //	Handles "GridFSCacheMaxAge <cache max age>" command
 static const char* gridfs_cache_max_age_command(cmd_parms* command, void* module_config, const char* argument)
 {
 {
     AP_INIT_TAKE1("GridFSConnection", (cmd_func)gridfs_connection_command, 0, OR_FILEINFO, "GridFS connection string."),
     AP_INIT_TAKE1("GridFSDatabase", (cmd_func)ap_set_string_slot, (void *)APR_OFFSETOF(gridfs_config, db_name), OR_FILEINFO, "GridFS database name."),
-///    AP_INIT_TAKE1("GridFSPoolSize", (cmd_func)gridfs_pool_size_command, 0, OR_FILEINFO, "GridFS pool size (per-process)."),
     AP_INIT_TAKE1("GridFSCacheMaxAge", (cmd_func)gridfs_cache_max_age_command, 0, OR_FILEINFO, "GridFS cache max age (seconds, 0 to disable expiration)."),
     AP_INIT_TAKE1("GridFSConnectTimeout", (cmd_func)gridfs_connect_timeout_command, 0, OR_FILEINFO, "GridFS connection timeout (seconds)."),
     {0}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.