You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2010/08/07 06:00:22 UTC
svn commit: r983170 - in /trafficserver/traffic/trunk:
iocore/hostdb/I_HostDBProcessor.h iocore/hostdb/P_HostDB.h
iocore/hostdb/P_HostDBProcessor.h proxy/config/records.config.in
Author: zwoop
Date: Sat Aug 7 04:00:22 2010
New Revision: 983170
URL: http://svn.apache.org/viewvc?rev=983170&view=rev
Log:
TS-400 Some more cleanup in hostdb.
Added storage_size to records.config.in
Modified:
trafficserver/traffic/trunk/iocore/hostdb/I_HostDBProcessor.h
trafficserver/traffic/trunk/iocore/hostdb/P_HostDB.h
trafficserver/traffic/trunk/iocore/hostdb/P_HostDBProcessor.h
trafficserver/traffic/trunk/proxy/config/records.config.in
Modified: trafficserver/traffic/trunk/iocore/hostdb/I_HostDBProcessor.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/hostdb/I_HostDBProcessor.h?rev=983170&r1=983169&r2=983170&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/hostdb/I_HostDBProcessor.h (original)
+++ trafficserver/traffic/trunk/iocore/hostdb/I_HostDBProcessor.h Sat Aug 7 04:00:22 2010
@@ -52,9 +52,8 @@ struct HostDBContinuation;
// a reasonable size memory cache, and use a (relatively) sparce
// disk representation to decrease # of seeks.
//
-
-extern unsigned int hostdb_current_interval;
extern int hostdb_enable;
+extern unsigned int hostdb_current_interval;
extern unsigned int hostdb_ip_stale_interval;
extern unsigned int hostdb_ip_timeout_interval;
extern unsigned int hostdb_ip_fail_timeout_interval;
@@ -391,6 +390,7 @@ struct HostDBRoundRobin
HostDBInfo *increment_round_robin()
{
bool bad = (n <= 0 || n > HOST_DB_MAX_ROUND_ROBIN_INFO || good <= 0 || good > HOST_DB_MAX_ROUND_ROBIN_INFO);
+
if (bad) {
ink_assert(!"bad round robin size");
return NULL;
@@ -399,8 +399,9 @@ struct HostDBRoundRobin
return NULL;
}
-HostDBRoundRobin():n(0), good(0), current(0) {
- }
+ HostDBRoundRobin()
+ : n(0), good(0), current(0)
+ { }
};
@@ -494,8 +495,6 @@ struct HostDBProcessor: public Processor
void run_HostDBTest();
-extern char hostdb_filename[PATH_NAME_MAX + 1];
-extern int hostdb_size;
extern inkcoreapi HostDBProcessor hostDBProcessor;
void ink_hostdb_init(ModuleVersion version);
Modified: trafficserver/traffic/trunk/iocore/hostdb/P_HostDB.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/hostdb/P_HostDB.h?rev=983170&r1=983169&r2=983170&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/hostdb/P_HostDB.h (original)
+++ trafficserver/traffic/trunk/iocore/hostdb/P_HostDB.h Sat Aug 7 04:00:22 2010
@@ -48,8 +48,6 @@
#include "I_HostDB.h"
// HostDB files
-#include "I_HostDBProcessor.h"
-
#include "P_DNS.h"
#include "P_MultiCache.h"
#include "P_HostDBProcessor.h"
Modified: trafficserver/traffic/trunk/iocore/hostdb/P_HostDBProcessor.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/hostdb/P_HostDBProcessor.h?rev=983170&r1=983169&r2=983170&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/hostdb/P_HostDBProcessor.h (original)
+++ trafficserver/traffic/trunk/iocore/hostdb/P_HostDBProcessor.h Sat Aug 7 04:00:22 2010
@@ -357,23 +357,26 @@ extern int hostdb_lookup_timeout;
extern int hostdb_insert_timeout;
extern int hostdb_re_dns_on_reload;
extern HostDBProcessor hostDBProcessor;
+
// 0 = obey, 1 = ignore, 2 = min(X,ttl), 3 = max(X,ttl)
enum
{ TTL_OBEY, TTL_IGNORE, TTL_MIN, TTL_MAX };
extern int hostdb_ttl_mode;
+
extern unsigned int hostdb_current_interval;
extern unsigned int hostdb_ip_stale_interval;
extern unsigned int hostdb_ip_timeout_interval;
extern unsigned int hostdb_ip_fail_timeout_interval;
extern int hostdb_size;
extern char hostdb_filename[PATH_NAME_MAX + 1];
+
//extern int hostdb_timestamp;
extern int hostdb_sync_frequency;
extern int hostdb_disable_reverse_lookup;
// Static configuration information
-
extern HostDBCache hostDB;
+
//extern Queue<HostDBContinuation> remoteHostDBQueue[MULTI_CACHE_PARTITIONS];
inline unsigned int
@@ -381,6 +384,7 @@ master_hash(INK_MD5 & md5)
{
return (int) (md5[1] >> 32);
}
+
inline bool
is_dotted_form_hostname(char *c)
{
@@ -399,7 +403,4 @@ HostDBContinuation::key_partition()
return hostDB.partition_of_bucket(fold_md5(md5) % hostDB.buckets);
}
-
-
-
#endif /* _P_HostDBProcessor_h_ */
Modified: trafficserver/traffic/trunk/proxy/config/records.config.in
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/config/records.config.in?rev=983170&r1=983169&r2=983170&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/config/records.config.in (original)
+++ trafficserver/traffic/trunk/proxy/config/records.config.in Sat Aug 7 04:00:22 2010
@@ -362,7 +362,10 @@ CONFIG proxy.config.dns.proxy_port INT 5
#
##############################################################################
# in entries, may not be changed while running
+ # note that in order to increase hostdb.size, hostdb.storage_size should
+ # also be increase.
CONFIG proxy.config.hostdb.size INT 200000
+CONFIG proxy.config.hostdb.storage_size INT 33554432
# ttl modes:
# 0 = obey
# 1 = ignore