[CalendarServer-changes] [4623] CalendarServer/branches/users/cdaboo/deployment-partition-4593
source_changes at macosforge.org
source_changes at macosforge.org
Wed Oct 21 06:35:41 PDT 2009
Revision: 4623
http://trac.macosforge.org/projects/calendarserver/changeset/4623
Author: cdaboo at apple.com
Date: 2009-10-21 06:35:39 -0700 (Wed, 21 Oct 2009)
Log Message:
-----------
Need to independently enable client or server memcached pools.
Modified Paths:
--------------
CalendarServer/branches/users/cdaboo/deployment-partition-4593/calendarserver/tools/util.py
CalendarServer/branches/users/cdaboo/deployment-partition-4593/conf/caldavd-test.plist
CalendarServer/branches/users/cdaboo/deployment-partition-4593/memcacheclient.py
CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/cluster.py
CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/config.py
CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/index.py
CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/memcachepool.py
CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/memcacher.py
CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/notify.py
CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/root.py
CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/tap.py
CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/test/test_tap.py
CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/test/util.py
Modified: CalendarServer/branches/users/cdaboo/deployment-partition-4593/calendarserver/tools/util.py
===================================================================
--- CalendarServer/branches/users/cdaboo/deployment-partition-4593/calendarserver/tools/util.py 2009-10-20 22:48:06 UTC (rev 4622)
+++ CalendarServer/branches/users/cdaboo/deployment-partition-4593/calendarserver/tools/util.py 2009-10-21 13:35:39 UTC (rev 4623)
@@ -121,7 +121,7 @@
If memcached is not running, set config.Memcached.ClientEnabled to False
"""
- if not config.Memcached.ClientEnabled:
+ if not config.Memcached.Pools.Default.ClientEnabled:
return
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
@@ -131,4 +131,4 @@
s.close()
except socket.error:
- config.Memcached.ClientEnabled = False
+ config.Memcached.Pools.Default.ClientEnabled = False
Modified: CalendarServer/branches/users/cdaboo/deployment-partition-4593/conf/caldavd-test.plist
===================================================================
--- CalendarServer/branches/users/cdaboo/deployment-partition-4593/conf/caldavd-test.plist 2009-10-20 22:48:06 UTC (rev 4622)
+++ CalendarServer/branches/users/cdaboo/deployment-partition-4593/conf/caldavd-test.plist 2009-10-21 13:35:39 UTC (rev 4623)
@@ -574,10 +574,6 @@
<!-- Support for Memcached -->
<key>Memcached</key>
<dict>
- <key>ServerEnabled</key>
- <true/>
- <key>ClientEnabled</key>
- <true/>
<key>MaxClients</key>
<integer>5</integer>
<key>memcached</key>
Modified: CalendarServer/branches/users/cdaboo/deployment-partition-4593/memcacheclient.py
===================================================================
--- CalendarServer/branches/users/cdaboo/deployment-partition-4593/memcacheclient.py 2009-10-20 22:48:06 UTC (rev 4622)
+++ CalendarServer/branches/users/cdaboo/deployment-partition-4593/memcacheclient.py 2009-10-21 13:35:39 UTC (rev 4623)
@@ -124,7 +124,7 @@
pickler=pickle.Pickler, unpickler=pickle.Unpickler,
pload=None, pid=None):
- if config.Memcached.ClientEnabled:
+ if config.Memcached.Pools.Default.ClientEnabled:
return Client(servers, debug=debug, pickleProtocol=pickleProtocol,
pickler=pickler, unpickler=unpickler, pload=pload, pid=pid)
elif cls.allowTestCache:
Modified: CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/cluster.py
===================================================================
--- CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/cluster.py 2009-10-20 22:48:06 UTC (rev 4622)
+++ CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/cluster.py 2009-10-21 13:35:39 UTC (rev 4623)
@@ -104,10 +104,6 @@
'-o', 'MultiProcess/ProcessCount=%d' % (
config.MultiProcess['ProcessCount'],)])
- if config.Memcached["ServerEnabled"]:
- args.extend(
- ['-o', 'Memcached/ClientEnabled=True'])
-
if self.ports:
args.extend([
'-o',
@@ -342,10 +338,10 @@
env=parentEnv)
- if config.Memcached["ServerEnabled"]:
- for name, pool in config.Memcached["Pools"].items():
+ for name, pool in config.Memcached["Pools"].items():
+ if pool["ServerEnabled"]:
log.msg("Adding memcached service for pool: %s" % (name,))
-
+
memcachedArgv = [
config.Memcached["memcached"],
'-p', str(pool["Port"]),
Modified: CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/config.py
===================================================================
--- CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/config.py 2009-10-20 22:48:06 UTC (rev 4622)
+++ CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/config.py 2009-10-21 13:35:39 UTC (rev 4623)
@@ -399,11 +399,10 @@
"Memcached": {
"MaxClients": 5,
- "ClientEnabled": True,
- "ServerEnabled": True,
"Pools": {
"Default": {
- "Enabled": True,
+ "ClientEnabled": True,
+ "ServerEnabled": True,
"BindAddress": "127.0.0.1",
"Port": 11211,
"HandleCacheTypes": [
@@ -411,7 +410,8 @@
]
},
# "ProxyDB": {
-# "Enabled": True,
+# "ClientEnabled": True,
+# "ServerEnabled": True,
# "BindAddress": "127.0.0.1",
# "Port": 11211,
# "HandleCacheTypes": [
Modified: CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/index.py
===================================================================
--- CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/index.py 2009-10-20 22:48:06 UTC (rev 4622)
+++ CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/index.py 2009-10-21 13:35:39 UTC (rev 4623)
@@ -686,7 +686,7 @@
assert resource.isCalendarCollection(), "non-calendar collection resource %s has no index." % (resource,)
super(Index, self).__init__(resource)
- if config.Memcached['ClientEnabled']:
+ if config.Memcached['Pools']['Default']['ClientEnabled']:
self.reserver = MemcachedUIDReserver(self)
else:
Modified: CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/memcachepool.py
===================================================================
--- CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/memcachepool.py 2009-10-20 22:48:06 UTC (rev 4622)
+++ CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/memcachepool.py 2009-10-21 13:35:39 UTC (rev 4623)
@@ -360,7 +360,7 @@
def installPools(pools, maxClients=5, reactor=None):
for name, pool in pools.items():
- if pool["Enabled"]:
+ if pool["ClientEnabled"]:
_installPool(
name,
pool["HandleCacheTypes"],
Modified: CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/memcacher.py
===================================================================
--- CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/memcacher.py 2009-10-20 22:48:06 UTC (rev 4622)
+++ CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/memcacher.py 2009-10-21 13:35:39 UTC (rev 4623)
@@ -92,7 +92,7 @@
if self._memcacheProtocol is not None:
return self._memcacheProtocol
- if config.Memcached['ClientEnabled']:
+ if config.Memcached['Pools']['Default']['ClientEnabled']:
return self.getCachePool()
elif config.ProcessType == "Single" or self._noInvalidation:
Modified: CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/notify.py
===================================================================
--- CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/notify.py 2009-10-20 22:48:06 UTC (rev 4622)
+++ CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/notify.py 2009-10-21 13:35:39 UTC (rev 4623)
@@ -1295,11 +1295,10 @@
#
# Configure Memcached Client Pool
#
- if config.Memcached.ClientEnabled:
- memcachepool.installPools(
- config.Memcached.Pools,
- config.Memcached.MaxClients,
- )
+ memcachepool.installPools(
+ config.Memcached.Pools,
+ config.Memcached.MaxClients,
+ )
multiService = service.MultiService()
Modified: CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/root.py
===================================================================
--- CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/root.py 2009-10-20 22:48:06 UTC (rev 4622)
+++ CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/root.py 2009-10-21 13:35:39 UTC (rev 4623)
@@ -71,7 +71,7 @@
self.contentFilters = []
- if config.Memcached['ClientEnabled']:
+ if config.Memcached['Pools']['Default']['ClientEnabled']:
self.responseCache = MemcacheResponseCache(self.fp)
CalendarHomeFile.cacheNotifierFactory = MemcacheChangeNotifier
Modified: CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/tap.py
===================================================================
--- CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/tap.py 2009-10-20 22:48:06 UTC (rev 4622)
+++ CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/tap.py 2009-10-21 13:35:39 UTC (rev 4623)
@@ -524,11 +524,10 @@
#
# Configure Memcached Client Pool
#
- if config.Memcached["ClientEnabled"]:
- memcachepool.installPools(
- config.Memcached.Pools,
- config.Memcached.MaxClients,
- )
+ memcachepool.installPools(
+ config.Memcached.Pools,
+ config.Memcached.MaxClients,
+ )
#
# Configure NotificationClient
Modified: CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/test/test_tap.py
===================================================================
--- CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/test/test_tap.py 2009-10-20 22:48:06 UTC (rev 4622)
+++ CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/test/test_tap.py 2009-10-21 13:35:39 UTC (rev 4623)
@@ -203,8 +203,8 @@
self.config['SudoersFile'] = ''
- self.config['Memcached']['ClientEnabled'] = False
- self.config['Memcached']['ServerEnabled'] = False
+ self.config['Memcached']['Pools']['Default']['ClientEnabled'] = False
+ self.config['Memcached']['Pools']['Default']['ServerEnabled'] = False
if self.configOptions:
config_mod._mergeData(self.config, self.configOptions)
Modified: CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/test/util.py
===================================================================
--- CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/test/util.py 2009-10-20 22:48:06 UTC (rev 4622)
+++ CalendarServer/branches/users/cdaboo/deployment-partition-4593/twistedcaldav/test/util.py 2009-10-21 13:35:39 UTC (rev 4623)
@@ -41,8 +41,8 @@
dataroot = self.mktemp()
os.mkdir(dataroot)
config.DataRoot = dataroot
- config.Memcached.ClientEnabled = False
- config.Memcached.ServerEnabled = False
+ config.Memcached.Pools.Default.ClientEnabled = False
+ config.Memcached.Pools.Default.ServerEnabled = False
memcacheclient.ClientFactory.allowTestCache = True
def createHierarchy(self, structure):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20091021/4a614a01/attachment-0001.html>
More information about the calendarserver-changes
mailing list