<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[14156] CalendarServer/trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.calendarserver.org//changeset/14156">14156</a></dd>
<dt>Author</dt> <dd>cdaboo@apple.com</dd>
<dt>Date</dt> <dd>2014-11-12 10:09:15 -0800 (Wed, 12 Nov 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Fix cross-pod group proxy change handling.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#CalendarServertrunkcalendarservertapcaldavpy">CalendarServer/trunk/calendarserver/tap/caldav.py</a></li>
<li><a href="#CalendarServertrunkcalendarservertoolsutilpy">CalendarServer/trunk/calendarserver/tools/util.py</a></li>
<li><a href="#CalendarServertrunkconfauthaccountstestpodxml">CalendarServer/trunk/conf/auth/accounts-test-pod.xml</a></li>
<li><a href="#CalendarServertrunkrequirementsdevtxt">CalendarServer/trunk/requirements-dev.txt</a></li>
<li><a href="#CalendarServertrunkrequirementsstabletxt">CalendarServer/trunk/requirements-stable.txt</a></li>
<li><a href="#CalendarServertrunktwistedcaldavcachepy">CalendarServer/trunk/twistedcaldav/cache.py</a></li>
<li><a href="#CalendarServertrunktwistedcaldavcontrolapipy">CalendarServer/trunk/twistedcaldav/controlapi.py</a></li>
<li><a href="#CalendarServertrunktwistedcaldavdirectorycalendaruserproxypy">CalendarServer/trunk/twistedcaldav/directory/calendaruserproxy.py</a></li>
<li><a href="#CalendarServertrunktxdavcommondatastorepoddingdirectorypy">CalendarServer/trunk/txdav/common/datastore/podding/directory.py</a></li>
<li><a href="#CalendarServertrunktxdavcommondatastoresqlpy">CalendarServer/trunk/txdav/common/datastore/sql.py</a></li>
<li><a href="#CalendarServertrunktxdavdpsclientpy">CalendarServer/trunk/txdav/dps/client.py</a></li>
<li><a href="#CalendarServertrunktxdavdpscommandspy">CalendarServer/trunk/txdav/dps/commands.py</a></li>
<li><a href="#CalendarServertrunktxdavdpsserverpy">CalendarServer/trunk/txdav/dps/server.py</a></li>
<li><a href="#CalendarServertrunktxdavwhoaugmentpy">CalendarServer/trunk/txdav/who/augment.py</a></li>
<li><a href="#CalendarServertrunktxdavwhocachepy">CalendarServer/trunk/txdav/who/cache.py</a></li>
<li><a href="#CalendarServertrunktxdavwhogroupspy">CalendarServer/trunk/txdav/who/groups.py</a></li>
<li><a href="#CalendarServertrunktxdavwhotesttest_delegatespy">CalendarServer/trunk/txdav/who/test/test_delegates.py</a></li>
<li><a href="#CalendarServertrunktxdavwhotesttest_groupspy">CalendarServer/trunk/txdav/who/test/test_groups.py</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="CalendarServertrunkcalendarservertapcaldavpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/calendarserver/tap/caldav.py (14155 => 14156)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/calendarserver/tap/caldav.py        2014-11-12 18:05:43 UTC (rev 14155)
+++ CalendarServer/trunk/calendarserver/tap/caldav.py        2014-11-12 18:09:15 UTC (rev 14156)
</span><span class="lines">@@ -94,6 +94,7 @@
</span><span class="cx"> from txdav.who.groups import GroupCacher
</span><span class="cx">
</span><span class="cx"> from twistedcaldav import memcachepool
</span><ins>+from twistedcaldav.cache import MemcacheURLPatternChangeNotifier
</ins><span class="cx"> from twistedcaldav.config import ConfigurationError
</span><span class="cx"> from twistedcaldav.localization import processLocalizationFiles
</span><span class="cx"> from twistedcaldav.stdconfig import DEFAULT_CONFIG, DEFAULT_CONFIG_FILE
</span><span class="lines">@@ -916,10 +917,12 @@
</span><span class="cx">
</span><span class="cx"> # Optionally set up group cacher
</span><span class="cx"> if config.GroupCaching.Enabled:
</span><ins>+ cacheNotifier = MemcacheURLPatternChangeNotifier("/principals/__uids__/{token}/", cacheHandle="PrincipalToken") if config.EnableResponseCache else None
</ins><span class="cx"> groupCacher = GroupCacher(
</span><span class="cx"> directory,
</span><span class="cx"> updateSeconds=config.GroupCaching.UpdateSeconds,
</span><span class="cx"> useDirectoryBasedDelegates=config.GroupCaching.UseDirectoryBasedDelegates,
</span><ins>+ cacheNotifier=cacheNotifier,
</ins><span class="cx"> )
</span><span class="cx"> else:
</span><span class="cx"> groupCacher = None
</span><span class="lines">@@ -1285,10 +1288,12 @@
</span><span class="cx">
</span><span class="cx"> # Optionally set up group cacher
</span><span class="cx"> if config.GroupCaching.Enabled:
</span><ins>+ cacheNotifier = MemcacheURLPatternChangeNotifier("/principals/__uids__/{token}/", cacheHandle="PrincipalToken") if config.EnableResponseCache else None
</ins><span class="cx"> groupCacher = GroupCacher(
</span><span class="cx"> directory,
</span><span class="cx"> updateSeconds=config.GroupCaching.UpdateSeconds,
</span><span class="cx"> useDirectoryBasedDelegates=config.GroupCaching.UseDirectoryBasedDelegates,
</span><ins>+ cacheNotifier=cacheNotifier,
</ins><span class="cx"> )
</span><span class="cx"> else:
</span><span class="cx"> groupCacher = None
</span><span class="lines">@@ -1872,10 +1877,12 @@
</span><span class="cx">
</span><span class="cx"> # Optionally set up group cacher
</span><span class="cx"> if config.GroupCaching.Enabled:
</span><ins>+ cacheNotifier = MemcacheURLPatternChangeNotifier("/principals/__uids__/{token}/", cacheHandle="PrincipalToken") if config.EnableResponseCache else None
</ins><span class="cx"> groupCacher = GroupCacher(
</span><span class="cx"> directory,
</span><span class="cx"> updateSeconds=config.GroupCaching.UpdateSeconds,
</span><span class="cx"> useDirectoryBasedDelegates=config.GroupCaching.UseDirectoryBasedDelegates,
</span><ins>+ cacheNotifier=cacheNotifier,
</ins><span class="cx"> )
</span><span class="cx"> else:
</span><span class="cx"> groupCacher = None
</span></span></pre></div>
<a id="CalendarServertrunkcalendarservertoolsutilpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/calendarserver/tools/util.py (14155 => 14156)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/calendarserver/tools/util.py        2014-11-12 18:05:43 UTC (rev 14155)
+++ CalendarServer/trunk/calendarserver/tools/util.py        2014-11-12 18:09:15 UTC (rev 14156)
</span><span class="lines">@@ -293,6 +293,8 @@
</span><span class="cx">
</span><span class="cx"> recordType, shortName = principalID.split(":", 1)
</span><span class="cx"> recordType = directory.oldNameToRecordType(recordType)
</span><ins>+ if recordType is None:
+ returnValue(None)
</ins><span class="cx">
</span><span class="cx"> returnValue((yield directory.recordWithShortName(recordType, shortName)))
</span><span class="cx">
</span></span></pre></div>
<a id="CalendarServertrunkconfauthaccountstestpodxml"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/conf/auth/accounts-test-pod.xml (14155 => 14156)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/conf/auth/accounts-test-pod.xml        2014-11-12 18:05:43 UTC (rev 14155)
+++ CalendarServer/trunk/conf/auth/accounts-test-pod.xml        2014-11-12 18:09:15 UTC (rev 14156)
</span><span class="lines">@@ -1627,4 +1627,718 @@
</span><span class="cx"> <full-name>Puser 100</full-name>
</span><span class="cx"> <email>puser100@example.com</email>
</span><span class="cx"> </record>
</span><ins>+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000001</uid>
+ <guid>20000000-0000-0000-0000-000000000001</guid>
+ <short-name>group01</short-name>
+ <full-name>Group 01</full-name>
+ <email>group01@example.com</email>
+ <member-uid>10000000-0000-0000-0000-000000000001</member-uid>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000002</uid>
+ <guid>20000000-0000-0000-0000-000000000002</guid>
+ <short-name>group02</short-name>
+ <full-name>Group 02</full-name>
+ <email>group02@example.com</email>
+ <member-uid>10000000-0000-0000-0000-000000000006</member-uid>
+ <member-uid>10000000-0000-0000-0000-000000000007</member-uid>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000003</uid>
+ <guid>20000000-0000-0000-0000-000000000003</guid>
+ <short-name>group03</short-name>
+ <full-name>Group 03</full-name>
+ <email>group03@example.com</email>
+ <member-uid>10000000-0000-0000-0000-000000000008</member-uid>
+ <member-uid>10000000-0000-0000-0000-000000000009</member-uid>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000004</uid>
+ <guid>20000000-0000-0000-0000-000000000004</guid>
+ <short-name>group04</short-name>
+ <full-name>Group 04</full-name>
+ <email>group04@example.com</email>
+ <member-uid>20000000-0000-0000-0000-000000000002</member-uid>
+ <member-uid>20000000-0000-0000-0000-000000000003</member-uid>
+ <member-uid>10000000-0000-0000-0000-000000000010</member-uid>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000005</uid>
+ <guid>20000000-0000-0000-0000-000000000005</guid>
+ <short-name>group05</short-name>
+ <full-name>Group 05</full-name>
+ <email>group05@example.com</email>
+ <member-uid>20000000-0000-0000-0000-000000000006</member-uid>
+ <member-uid>10000000-0000-0000-0000-000000000020</member-uid>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000006</uid>
+ <guid>20000000-0000-0000-0000-000000000006</guid>
+ <short-name>group06</short-name>
+ <full-name>Group 06</full-name>
+ <email>group06@example.com</email>
+ <member-uid>10000000-0000-0000-0000-000000000021</member-uid>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000007</uid>
+ <guid>20000000-0000-0000-0000-000000000007</guid>
+ <short-name>group07</short-name>
+ <full-name>Group 07</full-name>
+ <email>group07@example.com</email>
+ <member-uid>10000000-0000-0000-0000-000000000022</member-uid>
+ <member-uid>10000000-0000-0000-0000-000000000023</member-uid>
+ <member-uid>10000000-0000-0000-0000-000000000024</member-uid>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000008</uid>
+ <guid>20000000-0000-0000-0000-000000000008</guid>
+ <short-name>group08</short-name>
+ <full-name>Group 08</full-name>
+ <email>group08@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000009</uid>
+ <guid>20000000-0000-0000-0000-000000000009</guid>
+ <short-name>group09</short-name>
+ <full-name>Group 09</full-name>
+ <email>group09@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000010</uid>
+ <guid>20000000-0000-0000-0000-000000000010</guid>
+ <short-name>group10</short-name>
+ <full-name>Group 10</full-name>
+ <email>group10@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000011</uid>
+ <guid>20000000-0000-0000-0000-000000000011</guid>
+ <short-name>group11</short-name>
+ <full-name>Group 11</full-name>
+ <email>group11@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000012</uid>
+ <guid>20000000-0000-0000-0000-000000000012</guid>
+ <short-name>group12</short-name>
+ <full-name>Group 12</full-name>
+ <email>group12@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000013</uid>
+ <guid>20000000-0000-0000-0000-000000000013</guid>
+ <short-name>group13</short-name>
+ <full-name>Group 13</full-name>
+ <email>group13@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000014</uid>
+ <guid>20000000-0000-0000-0000-000000000014</guid>
+ <short-name>group14</short-name>
+ <full-name>Group 14</full-name>
+ <email>group14@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000015</uid>
+ <guid>20000000-0000-0000-0000-000000000015</guid>
+ <short-name>group15</short-name>
+ <full-name>Group 15</full-name>
+ <email>group15@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000016</uid>
+ <guid>20000000-0000-0000-0000-000000000016</guid>
+ <short-name>group16</short-name>
+ <full-name>Group 16</full-name>
+ <email>group16@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000017</uid>
+ <guid>20000000-0000-0000-0000-000000000017</guid>
+ <short-name>group17</short-name>
+ <full-name>Group 17</full-name>
+ <email>group17@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000018</uid>
+ <guid>20000000-0000-0000-0000-000000000018</guid>
+ <short-name>group18</short-name>
+ <full-name>Group 18</full-name>
+ <email>group18@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000019</uid>
+ <guid>20000000-0000-0000-0000-000000000019</guid>
+ <short-name>group19</short-name>
+ <full-name>Group 19</full-name>
+ <email>group19@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000020</uid>
+ <guid>20000000-0000-0000-0000-000000000020</guid>
+ <short-name>group20</short-name>
+ <full-name>Group 20</full-name>
+ <email>group20@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000021</uid>
+ <guid>20000000-0000-0000-0000-000000000021</guid>
+ <short-name>group21</short-name>
+ <full-name>Group 21</full-name>
+ <email>group21@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000022</uid>
+ <guid>20000000-0000-0000-0000-000000000022</guid>
+ <short-name>group22</short-name>
+ <full-name>Group 22</full-name>
+ <email>group22@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000023</uid>
+ <guid>20000000-0000-0000-0000-000000000023</guid>
+ <short-name>group23</short-name>
+ <full-name>Group 23</full-name>
+ <email>group23@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000024</uid>
+ <guid>20000000-0000-0000-0000-000000000024</guid>
+ <short-name>group24</short-name>
+ <full-name>Group 24</full-name>
+ <email>group24@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000025</uid>
+ <guid>20000000-0000-0000-0000-000000000025</guid>
+ <short-name>group25</short-name>
+ <full-name>Group 25</full-name>
+ <email>group25@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000026</uid>
+ <guid>20000000-0000-0000-0000-000000000026</guid>
+ <short-name>group26</short-name>
+ <full-name>Group 26</full-name>
+ <email>group26@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000027</uid>
+ <guid>20000000-0000-0000-0000-000000000027</guid>
+ <short-name>group27</short-name>
+ <full-name>Group 27</full-name>
+ <email>group27@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000028</uid>
+ <guid>20000000-0000-0000-0000-000000000028</guid>
+ <short-name>group28</short-name>
+ <full-name>Group 28</full-name>
+ <email>group28@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000029</uid>
+ <guid>20000000-0000-0000-0000-000000000029</guid>
+ <short-name>group29</short-name>
+ <full-name>Group 29</full-name>
+ <email>group29@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000030</uid>
+ <guid>20000000-0000-0000-0000-000000000030</guid>
+ <short-name>group30</short-name>
+ <full-name>Group 30</full-name>
+ <email>group30@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000031</uid>
+ <guid>20000000-0000-0000-0000-000000000031</guid>
+ <short-name>group31</short-name>
+ <full-name>Group 31</full-name>
+ <email>group31@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000032</uid>
+ <guid>20000000-0000-0000-0000-000000000032</guid>
+ <short-name>group32</short-name>
+ <full-name>Group 32</full-name>
+ <email>group32@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000033</uid>
+ <guid>20000000-0000-0000-0000-000000000033</guid>
+ <short-name>group33</short-name>
+ <full-name>Group 33</full-name>
+ <email>group33@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000034</uid>
+ <guid>20000000-0000-0000-0000-000000000034</guid>
+ <short-name>group34</short-name>
+ <full-name>Group 34</full-name>
+ <email>group34@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000035</uid>
+ <guid>20000000-0000-0000-0000-000000000035</guid>
+ <short-name>group35</short-name>
+ <full-name>Group 35</full-name>
+ <email>group35@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000036</uid>
+ <guid>20000000-0000-0000-0000-000000000036</guid>
+ <short-name>group36</short-name>
+ <full-name>Group 36</full-name>
+ <email>group36@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000037</uid>
+ <guid>20000000-0000-0000-0000-000000000037</guid>
+ <short-name>group37</short-name>
+ <full-name>Group 37</full-name>
+ <email>group37@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000038</uid>
+ <guid>20000000-0000-0000-0000-000000000038</guid>
+ <short-name>group38</short-name>
+ <full-name>Group 38</full-name>
+ <email>group38@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000039</uid>
+ <guid>20000000-0000-0000-0000-000000000039</guid>
+ <short-name>group39</short-name>
+ <full-name>Group 39</full-name>
+ <email>group39@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000040</uid>
+ <guid>20000000-0000-0000-0000-000000000040</guid>
+ <short-name>group40</short-name>
+ <full-name>Group 40</full-name>
+ <email>group40@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000041</uid>
+ <guid>20000000-0000-0000-0000-000000000041</guid>
+ <short-name>group41</short-name>
+ <full-name>Group 41</full-name>
+ <email>group41@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000042</uid>
+ <guid>20000000-0000-0000-0000-000000000042</guid>
+ <short-name>group42</short-name>
+ <full-name>Group 42</full-name>
+ <email>group42@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000043</uid>
+ <guid>20000000-0000-0000-0000-000000000043</guid>
+ <short-name>group43</short-name>
+ <full-name>Group 43</full-name>
+ <email>group43@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000044</uid>
+ <guid>20000000-0000-0000-0000-000000000044</guid>
+ <short-name>group44</short-name>
+ <full-name>Group 44</full-name>
+ <email>group44@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000045</uid>
+ <guid>20000000-0000-0000-0000-000000000045</guid>
+ <short-name>group45</short-name>
+ <full-name>Group 45</full-name>
+ <email>group45@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000046</uid>
+ <guid>20000000-0000-0000-0000-000000000046</guid>
+ <short-name>group46</short-name>
+ <full-name>Group 46</full-name>
+ <email>group46@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000047</uid>
+ <guid>20000000-0000-0000-0000-000000000047</guid>
+ <short-name>group47</short-name>
+ <full-name>Group 47</full-name>
+ <email>group47@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000048</uid>
+ <guid>20000000-0000-0000-0000-000000000048</guid>
+ <short-name>group48</short-name>
+ <full-name>Group 48</full-name>
+ <email>group48@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000049</uid>
+ <guid>20000000-0000-0000-0000-000000000049</guid>
+ <short-name>group49</short-name>
+ <full-name>Group 49</full-name>
+ <email>group49@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000050</uid>
+ <guid>20000000-0000-0000-0000-000000000050</guid>
+ <short-name>group50</short-name>
+ <full-name>Group 50</full-name>
+ <email>group50@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000051</uid>
+ <guid>20000000-0000-0000-0000-000000000051</guid>
+ <short-name>group51</short-name>
+ <full-name>Group 51</full-name>
+ <email>group51@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000052</uid>
+ <guid>20000000-0000-0000-0000-000000000052</guid>
+ <short-name>group52</short-name>
+ <full-name>Group 52</full-name>
+ <email>group52@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000053</uid>
+ <guid>20000000-0000-0000-0000-000000000053</guid>
+ <short-name>group53</short-name>
+ <full-name>Group 53</full-name>
+ <email>group53@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000054</uid>
+ <guid>20000000-0000-0000-0000-000000000054</guid>
+ <short-name>group54</short-name>
+ <full-name>Group 54</full-name>
+ <email>group54@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000055</uid>
+ <guid>20000000-0000-0000-0000-000000000055</guid>
+ <short-name>group55</short-name>
+ <full-name>Group 55</full-name>
+ <email>group55@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000056</uid>
+ <guid>20000000-0000-0000-0000-000000000056</guid>
+ <short-name>group56</short-name>
+ <full-name>Group 56</full-name>
+ <email>group56@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000057</uid>
+ <guid>20000000-0000-0000-0000-000000000057</guid>
+ <short-name>group57</short-name>
+ <full-name>Group 57</full-name>
+ <email>group57@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000058</uid>
+ <guid>20000000-0000-0000-0000-000000000058</guid>
+ <short-name>group58</short-name>
+ <full-name>Group 58</full-name>
+ <email>group58@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000059</uid>
+ <guid>20000000-0000-0000-0000-000000000059</guid>
+ <short-name>group59</short-name>
+ <full-name>Group 59</full-name>
+ <email>group59@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000060</uid>
+ <guid>20000000-0000-0000-0000-000000000060</guid>
+ <short-name>group60</short-name>
+ <full-name>Group 60</full-name>
+ <email>group60@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000061</uid>
+ <guid>20000000-0000-0000-0000-000000000061</guid>
+ <short-name>group61</short-name>
+ <full-name>Group 61</full-name>
+ <email>group61@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000062</uid>
+ <guid>20000000-0000-0000-0000-000000000062</guid>
+ <short-name>group62</short-name>
+ <full-name>Group 62</full-name>
+ <email>group62@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000063</uid>
+ <guid>20000000-0000-0000-0000-000000000063</guid>
+ <short-name>group63</short-name>
+ <full-name>Group 63</full-name>
+ <email>group63@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000064</uid>
+ <guid>20000000-0000-0000-0000-000000000064</guid>
+ <short-name>group64</short-name>
+ <full-name>Group 64</full-name>
+ <email>group64@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000065</uid>
+ <guid>20000000-0000-0000-0000-000000000065</guid>
+ <short-name>group65</short-name>
+ <full-name>Group 65</full-name>
+ <email>group65@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000066</uid>
+ <guid>20000000-0000-0000-0000-000000000066</guid>
+ <short-name>group66</short-name>
+ <full-name>Group 66</full-name>
+ <email>group66@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000067</uid>
+ <guid>20000000-0000-0000-0000-000000000067</guid>
+ <short-name>group67</short-name>
+ <full-name>Group 67</full-name>
+ <email>group67@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000068</uid>
+ <guid>20000000-0000-0000-0000-000000000068</guid>
+ <short-name>group68</short-name>
+ <full-name>Group 68</full-name>
+ <email>group68@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000069</uid>
+ <guid>20000000-0000-0000-0000-000000000069</guid>
+ <short-name>group69</short-name>
+ <full-name>Group 69</full-name>
+ <email>group69@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000070</uid>
+ <guid>20000000-0000-0000-0000-000000000070</guid>
+ <short-name>group70</short-name>
+ <full-name>Group 70</full-name>
+ <email>group70@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000071</uid>
+ <guid>20000000-0000-0000-0000-000000000071</guid>
+ <short-name>group71</short-name>
+ <full-name>Group 71</full-name>
+ <email>group71@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000072</uid>
+ <guid>20000000-0000-0000-0000-000000000072</guid>
+ <short-name>group72</short-name>
+ <full-name>Group 72</full-name>
+ <email>group72@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000073</uid>
+ <guid>20000000-0000-0000-0000-000000000073</guid>
+ <short-name>group73</short-name>
+ <full-name>Group 73</full-name>
+ <email>group73@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000074</uid>
+ <guid>20000000-0000-0000-0000-000000000074</guid>
+ <short-name>group74</short-name>
+ <full-name>Group 74</full-name>
+ <email>group74@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000075</uid>
+ <guid>20000000-0000-0000-0000-000000000075</guid>
+ <short-name>group75</short-name>
+ <full-name>Group 75</full-name>
+ <email>group75@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000076</uid>
+ <guid>20000000-0000-0000-0000-000000000076</guid>
+ <short-name>group76</short-name>
+ <full-name>Group 76</full-name>
+ <email>group76@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000077</uid>
+ <guid>20000000-0000-0000-0000-000000000077</guid>
+ <short-name>group77</short-name>
+ <full-name>Group 77</full-name>
+ <email>group77@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000078</uid>
+ <guid>20000000-0000-0000-0000-000000000078</guid>
+ <short-name>group78</short-name>
+ <full-name>Group 78</full-name>
+ <email>group78@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000079</uid>
+ <guid>20000000-0000-0000-0000-000000000079</guid>
+ <short-name>group79</short-name>
+ <full-name>Group 79</full-name>
+ <email>group79@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000080</uid>
+ <guid>20000000-0000-0000-0000-000000000080</guid>
+ <short-name>group80</short-name>
+ <full-name>Group 80</full-name>
+ <email>group80@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000081</uid>
+ <guid>20000000-0000-0000-0000-000000000081</guid>
+ <short-name>group81</short-name>
+ <full-name>Group 81</full-name>
+ <email>group81@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000082</uid>
+ <guid>20000000-0000-0000-0000-000000000082</guid>
+ <short-name>group82</short-name>
+ <full-name>Group 82</full-name>
+ <email>group82@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000083</uid>
+ <guid>20000000-0000-0000-0000-000000000083</guid>
+ <short-name>group83</short-name>
+ <full-name>Group 83</full-name>
+ <email>group83@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000084</uid>
+ <guid>20000000-0000-0000-0000-000000000084</guid>
+ <short-name>group84</short-name>
+ <full-name>Group 84</full-name>
+ <email>group84@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000085</uid>
+ <guid>20000000-0000-0000-0000-000000000085</guid>
+ <short-name>group85</short-name>
+ <full-name>Group 85</full-name>
+ <email>group85@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000086</uid>
+ <guid>20000000-0000-0000-0000-000000000086</guid>
+ <short-name>group86</short-name>
+ <full-name>Group 86</full-name>
+ <email>group86@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000087</uid>
+ <guid>20000000-0000-0000-0000-000000000087</guid>
+ <short-name>group87</short-name>
+ <full-name>Group 87</full-name>
+ <email>group87@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000088</uid>
+ <guid>20000000-0000-0000-0000-000000000088</guid>
+ <short-name>group88</short-name>
+ <full-name>Group 88</full-name>
+ <email>group88@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000089</uid>
+ <guid>20000000-0000-0000-0000-000000000089</guid>
+ <short-name>group89</short-name>
+ <full-name>Group 89</full-name>
+ <email>group89@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000090</uid>
+ <guid>20000000-0000-0000-0000-000000000090</guid>
+ <short-name>group90</short-name>
+ <full-name>Group 90</full-name>
+ <email>group90@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000091</uid>
+ <guid>20000000-0000-0000-0000-000000000091</guid>
+ <short-name>group91</short-name>
+ <full-name>Group 91</full-name>
+ <email>group91@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000092</uid>
+ <guid>20000000-0000-0000-0000-000000000092</guid>
+ <short-name>group92</short-name>
+ <full-name>Group 92</full-name>
+ <email>group92@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000093</uid>
+ <guid>20000000-0000-0000-0000-000000000093</guid>
+ <short-name>group93</short-name>
+ <full-name>Group 93</full-name>
+ <email>group93@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000094</uid>
+ <guid>20000000-0000-0000-0000-000000000094</guid>
+ <short-name>group94</short-name>
+ <full-name>Group 94</full-name>
+ <email>group94@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000095</uid>
+ <guid>20000000-0000-0000-0000-000000000095</guid>
+ <short-name>group95</short-name>
+ <full-name>Group 95</full-name>
+ <email>group95@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000096</uid>
+ <guid>20000000-0000-0000-0000-000000000096</guid>
+ <short-name>group96</short-name>
+ <full-name>Group 96</full-name>
+ <email>group96@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000097</uid>
+ <guid>20000000-0000-0000-0000-000000000097</guid>
+ <short-name>group97</short-name>
+ <full-name>Group 97</full-name>
+ <email>group97@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000098</uid>
+ <guid>20000000-0000-0000-0000-000000000098</guid>
+ <short-name>group98</short-name>
+ <full-name>Group 98</full-name>
+ <email>group98@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000099</uid>
+ <guid>20000000-0000-0000-0000-000000000099</guid>
+ <short-name>group99</short-name>
+ <full-name>Group 99</full-name>
+ <email>group99@example.com</email>
+</record>
+<record type="group">
+ <uid>20000000-0000-0000-0000-000000000100</uid>
+ <guid>20000000-0000-0000-0000-000000000100</guid>
+ <short-name>group100</short-name>
+ <full-name>Group 100</full-name>
+ <email>group100@example.com</email>
+</record>
</ins><span class="cx"> </directory>
</span></span></pre></div>
<a id="CalendarServertrunkrequirementsdevtxt"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/requirements-dev.txt (14155 => 14156)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/requirements-dev.txt        2014-11-12 18:05:43 UTC (rev 14155)
+++ CalendarServer/trunk/requirements-dev.txt        2014-11-12 18:09:15 UTC (rev 14156)
</span><span class="lines">@@ -7,4 +7,4 @@
</span><span class="cx"> mockldap
</span><span class="cx"> q
</span><span class="cx"> --editable svn+http://svn.calendarserver.org/repository/calendarserver/CalDAVClientLibrary/trunk@13420#egg=CalDAVClientLibrary
</span><del>---editable svn+http://svn.calendarserver.org/repository/calendarserver/CalDAVTester/trunk@14118#egg=CalDAVTester
</del><ins>+--editable svn+http://svn.calendarserver.org/repository/calendarserver/CalDAVTester/trunk@14154#egg=CalDAVTester
</ins></span></pre></div>
<a id="CalendarServertrunkrequirementsstabletxt"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/requirements-stable.txt (14155 => 14156)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/requirements-stable.txt        2014-11-12 18:05:43 UTC (rev 14155)
+++ CalendarServer/trunk/requirements-stable.txt        2014-11-12 18:09:15 UTC (rev 14156)
</span><span class="lines">@@ -5,7 +5,7 @@
</span><span class="cx"> # For CalendarServer development, don't try to get these projects from PyPI; use svn.
</span><span class="cx">
</span><span class="cx"> -e .
</span><del>--e svn+http://svn.calendarserver.org/repository/calendarserver/twext/trunk@14133#egg=twextpy
</del><ins>+-e svn+http://svn.calendarserver.org/repository/calendarserver/twext/trunk@14155#egg=twextpy
</ins><span class="cx"> -e svn+http://svn.calendarserver.org/repository/calendarserver/PyKerberos/trunk@13420#egg=kerberos
</span><span class="cx"> -e svn+http://svn.calendarserver.org/repository/calendarserver/PyCalendar/trunk@14025#egg=pycalendar
</span><span class="cx">
</span></span></pre></div>
<a id="CalendarServertrunktwistedcaldavcachepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twistedcaldav/cache.py (14155 => 14156)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twistedcaldav/cache.py        2014-11-12 18:05:43 UTC (rev 14155)
+++ CalendarServer/trunk/twistedcaldav/cache.py        2014-11-12 18:09:15 UTC (rev 14156)
</span><span class="lines">@@ -135,6 +135,40 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx">
</span><ins>+class MemcacheURLPatternChangeNotifier(CachePoolUserMixIn):
+ """
+ A change notifier used to target arbitrary tokens.
+ """
+ log = Logger()
+
+ def __init__(self, urlPattern, cachePool=None, cacheHandle="Default"):
+ self._urlPattern = urlPattern
+ self._cachePool = cachePool
+ self._cachePoolHandle = cacheHandle
+
+
+ def _newCacheToken(self):
+ return str(uuid.uuid4())
+
+
+ def changed(self, token):
+ """
+ Change the cache token for a resource
+
+ return: A L{Deferred} that fires when the token has been changed.
+ """
+
+ url = self._urlPattern.format(token=token)
+
+ self.log.debug("Changing Cache Token for {url}", url=url)
+ return self.getCachePool().set(
+ 'cacheToken:{url}'.format(url=url),
+ self._newCacheToken(),
+ expireTime=config.ResponseCacheTimeout * 60,
+ )
+
+
+
</ins><span class="cx"> class BaseResponseCache(object):
</span><span class="cx"> """
</span><span class="cx"> A base class which provides some common operations
</span></span></pre></div>
<a id="CalendarServertrunktwistedcaldavcontrolapipy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twistedcaldav/controlapi.py (14155 => 14156)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twistedcaldav/controlapi.py        2014-11-12 18:05:43 UTC (rev 14155)
+++ CalendarServer/trunk/twistedcaldav/controlapi.py        2014-11-12 18:09:15 UTC (rev 14156)
</span><span class="lines">@@ -325,6 +325,7 @@
</span><span class="cx"> @inlineCallbacks
</span><span class="cx"> def action_refreshgroups(self, j):
</span><span class="cx"> txn = self._store.newTransaction()
</span><ins>+ yield txn.directoryService().flush()
</ins><span class="cx"> wp = yield GroupCacherPollingWork.reschedule(txn, 0, force=True)
</span><span class="cx"> jobID = wp.workItem.jobID
</span><span class="cx"> yield txn.commit()
</span></span></pre></div>
<a id="CalendarServertrunktwistedcaldavdirectorycalendaruserproxypy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twistedcaldav/directory/calendaruserproxy.py (14155 => 14156)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twistedcaldav/directory/calendaruserproxy.py        2014-11-12 18:05:43 UTC (rev 14155)
+++ CalendarServer/trunk/twistedcaldav/directory/calendaruserproxy.py        2014-11-12 18:09:15 UTC (rev 14156)
</span><span class="lines">@@ -303,14 +303,23 @@
</span><span class="cx"> principals.append(principal)
</span><span class="cx"> newUIDs.add(principal.principalUID())
</span><span class="cx">
</span><del>- # Get the old set of UIDs
- # oldUIDs = (yield self._index().getMembers(self.uid))
</del><ins>+ # Get the old set of expanded UIDs
+ oldUIDs = set()
</ins><span class="cx"> oldPrincipals = yield self.groupMembers()
</span><del>- oldUIDs = [p.principalUID() for p in oldPrincipals]
</del><ins>+ oldUIDs.update([p.principalUID() for p in oldPrincipals])
+ oldPrincipals = yield self.expandedGroupMembers()
+ oldUIDs.update([p.principalUID() for p in oldPrincipals])
</ins><span class="cx">
</span><span class="cx"> # Change membership
</span><span class="cx"> yield self.setGroupMemberSetPrincipals(principals)
</span><span class="cx">
</span><ins>+ # Get the new set of UIDs
+ newUIDs = set()
+ newPrincipals = yield self.groupMembers()
+ newUIDs.update([p.principalUID() for p in newPrincipals])
+ newPrincipals = yield self.expandedGroupMembers()
+ newUIDs.update([p.principalUID() for p in newPrincipals])
+
</ins><span class="cx"> # Invalidate the primary principal's cache, and any principal's whose
</span><span class="cx"> # membership status changed
</span><span class="cx"> yield self.parent.cacheNotifier.changed()
</span></span></pre></div>
<a id="CalendarServertrunktxdavcommondatastorepoddingdirectorypy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/common/datastore/podding/directory.py (14155 => 14156)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/common/datastore/podding/directory.py        2014-11-12 18:05:43 UTC (rev 14155)
+++ CalendarServer/trunk/txdav/common/datastore/podding/directory.py        2014-11-12 18:09:15 UTC (rev 14156)
</span><span class="lines">@@ -27,6 +27,55 @@
</span><span class="cx"> """
</span><span class="cx">
</span><span class="cx"> @inlineCallbacks
</span><ins>+ def send_all_group_delegates(self, txn, server):
+ """
+ Request all group delegates on another pod.
+
+ @param txn: transaction to use
+ @type txn: L{CommonStoreTransaction}
+ @param server: server to query
+ @type server: L{Server}
+ """
+
+ request = {
+ "action": "all-group-delegates",
+ }
+ response = yield self.sendRequestToServer(txn, server, request)
+
+ if response["result"] == "ok":
+ returnValue(set(response["value"]))
+ elif response["result"] == "exception":
+ raise namedClass(response["class"])(response["result"])
+
+
+ @inlineCallbacks
+ def recv_all_group_delegates(self, txn, request):
+ """
+ Process an all group delegates cross-pod request. Request arguments as per L{send_all_group_delegates}.
+
+ @param request: request arguments
+ @type request: C{dict}
+ """
+
+ if request["action"] != "all-group-delegates":
+ raise FailedCrossPodRequestError("Wrong action '{}' for recv_all_group_delegates".format(request["action"]))
+
+ try:
+ delegatedUIDs = yield txn.allGroupDelegates()
+ except Exception as e:
+ returnValue({
+ "result": "exception",
+ "class": ".".join((e.__class__.__module__, e.__class__.__name__,)),
+ "request": str(e),
+ })
+
+ returnValue({
+ "result": "ok",
+ "value": list(delegatedUIDs),
+ })
+
+
+ @inlineCallbacks
</ins><span class="cx"> def send_set_delegates(self, txn, delegator, delegates, readWrite):
</span><span class="cx"> """
</span><span class="cx"> Set delegates for delegator on another pod.
</span></span></pre></div>
<a id="CalendarServertrunktxdavcommondatastoresqlpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/common/datastore/sql.py (14155 => 14156)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/common/datastore/sql.py        2014-11-12 18:05:43 UTC (rev 14155)
+++ CalendarServer/trunk/txdav/common/datastore/sql.py        2014-11-12 18:09:15 UTC (rev 14156)
</span><span class="lines">@@ -1376,9 +1376,11 @@
</span><span class="cx"> )
</span><span class="cx">
</span><span class="cx"> if membershipChanged:
</span><del>- yield self.synchronizeMembers(groupID, set(memberUIDs))
</del><ins>+ addedUIDs, removedUIDs = yield self.synchronizeMembers(groupID, set(memberUIDs))
+ else:
+ addedUIDs = removedUIDs = None
</ins><span class="cx">
</span><del>- returnValue(membershipChanged)
</del><ins>+ returnValue((membershipChanged, addedUIDs, removedUIDs,))
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> @inlineCallbacks
</span><span class="lines">@@ -1394,22 +1396,19 @@
</span><span class="cx"> @param newMemberUIDs: set of new member UIDs in the group
</span><span class="cx"> @type newMemberUIDs: L{set} of L{str}
</span><span class="cx"> """
</span><del>- numRemoved = numAdded = 0
</del><span class="cx"> cachedMemberUIDs = (yield self.groupMemberUIDs(groupID))
</span><span class="cx">
</span><span class="cx"> removed = cachedMemberUIDs - newMemberUIDs
</span><span class="cx"> for memberUID in removed:
</span><del>- numRemoved += 1
</del><span class="cx"> yield self.removeMemberFromGroup(memberUID, groupID)
</span><span class="cx">
</span><span class="cx"> added = newMemberUIDs - cachedMemberUIDs
</span><span class="cx"> for memberUID in added:
</span><del>- numAdded += 1
</del><span class="cx"> yield self.addMemberToGroup(memberUID, groupID)
</span><span class="cx">
</span><span class="cx"> yield self.groupChanged(groupID, added, removed)
</span><span class="cx">
</span><del>- returnValue((numAdded, numRemoved))
</del><ins>+ returnValue((added, removed,))
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> @inlineCallbacks
</span></span></pre></div>
<a id="CalendarServertrunktxdavdpsclientpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/dps/client.py (14155 => 14156)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/dps/client.py        2014-11-12 18:05:43 UTC (rev 14155)
+++ CalendarServer/trunk/txdav/dps/client.py        2014-11-12 18:09:15 UTC (rev 14156)
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx"> WikiAccessForUIDCommand, ContinuationCommand,
</span><span class="cx"> StatsCommand, ExternalDelegatesCommand, ExpandedMemberUIDsCommand,
</span><span class="cx"> AddMembersCommand, RemoveMembersCommand,
</span><del>- UpdateRecordsCommand, ExpandedMembersCommand
</del><ins>+ UpdateRecordsCommand, ExpandedMembersCommand, FlushCommand
</ins><span class="cx"> )
</span><span class="cx"> from txdav.who.delegates import RecordType as DelegatesRecordType
</span><span class="cx"> from txdav.who.directory import (
</span><span class="lines">@@ -423,6 +423,15 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> @inlineCallbacks
</span><ins>+ def flush(self):
+ try:
+ yield self._sendCommand(FlushCommand)
+ returnValue(None)
+ except ConnectError:
+ returnValue(None)
+
+
+ @inlineCallbacks
</ins><span class="cx"> def stats(self):
</span><span class="cx"> try:
</span><span class="cx"> result = yield self._sendCommand(StatsCommand)
</span></span></pre></div>
<a id="CalendarServertrunktxdavdpscommandspy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/dps/commands.py (14155 => 14156)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/dps/commands.py        2014-11-12 18:05:43 UTC (rev 14155)
+++ CalendarServer/trunk/txdav/dps/commands.py        2014-11-12 18:09:15 UTC (rev 14156)
</span><span class="lines">@@ -266,6 +266,14 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx">
</span><ins>+class FlushCommand(amp.Command):
+ arguments = []
+ response = [
+ ('flush', amp.Boolean()),
+ ]
+
+
+
</ins><span class="cx"> class StatsCommand(amp.Command):
</span><span class="cx"> arguments = []
</span><span class="cx"> response = [
</span></span></pre></div>
<a id="CalendarServertrunktxdavdpsserverpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/dps/server.py (14155 => 14156)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/dps/server.py        2014-11-12 18:05:43 UTC (rev 14155)
+++ CalendarServer/trunk/txdav/dps/server.py        2014-11-12 18:09:15 UTC (rev 14156)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> WikiAccessForUIDCommand, ContinuationCommand,
</span><span class="cx"> ExternalDelegatesCommand, StatsCommand, ExpandedMemberUIDsCommand,
</span><span class="cx"> AddMembersCommand, RemoveMembersCommand,
</span><del>- UpdateRecordsCommand, # RemoveRecordsCommand,
</del><ins>+ UpdateRecordsCommand, FlushCommand, # RemoveRecordsCommand,
</ins><span class="cx"> )
</span><span class="cx"> from txdav.who.wiki import WikiAccessLevel
</span><span class="cx"> from zope.interface import implementer
</span><span class="lines">@@ -647,6 +647,16 @@
</span><span class="cx"> returnValue(response)
</span><span class="cx">
</span><span class="cx">
</span><ins>+ @FlushCommand.responder
+ @inlineCallbacks
+ def flush(self):
+ yield self._directory.flush()
+ response = {
+ "flush": True,
+ }
+ returnValue(response)
+
+
</ins><span class="cx"> @StatsCommand.responder
</span><span class="cx"> @inlineCallbacks
</span><span class="cx"> def stats(self):
</span></span></pre></div>
<a id="CalendarServertrunktxdavwhoaugmentpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/who/augment.py (14155 => 14156)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/who/augment.py        2014-11-12 18:05:43 UTC (rev 14155)
+++ CalendarServer/trunk/txdav/who/augment.py        2014-11-12 18:09:15 UTC (rev 14156)
</span><span class="lines">@@ -128,6 +128,10 @@
</span><span class="cx"> cls._timings[key] = (count, timeSpent)
</span><span class="cx">
</span><span class="cx">
</span><ins>+ def flush(self):
+ return self._directory.flush()
+
+
</ins><span class="cx"> def stats(self):
</span><span class="cx"> results = {}
</span><span class="cx"> results.update(self._timings)
</span></span></pre></div>
<a id="CalendarServertrunktxdavwhocachepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/who/cache.py (14155 => 14156)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/who/cache.py        2014-11-12 18:05:43 UTC (rev 14155)
+++ CalendarServer/trunk/txdav/who/cache.py        2014-11-12 18:09:15 UTC (rev 14156)
</span><span class="lines">@@ -416,5 +416,11 @@
</span><span class="cx"> )
</span><span class="cx">
</span><span class="cx">
</span><ins>+ @inlineCallbacks
+ def flush(self):
+ self.resetCache()
+ yield self._directory.flush()
+
+
</ins><span class="cx"> def stats(self):
</span><span class="cx"> return self._directory.stats()
</span></span></pre></div>
<a id="CalendarServertrunktxdavwhogroupspy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/who/groups.py (14155 => 14156)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/who/groups.py        2014-11-12 18:05:43 UTC (rev 14155)
+++ CalendarServer/trunk/txdav/who/groups.py        2014-11-12 18:09:15 UTC (rev 14156)
</span><span class="lines">@@ -23,11 +23,13 @@
</span><span class="cx"> from twext.enterprise.dal.syntax import Delete, Select, Parameter
</span><span class="cx"> from twext.enterprise.jobqueue import WorkItem, RegeneratingWorkItem
</span><span class="cx"> from twext.python.log import Logger
</span><del>-from twisted.internet.defer import inlineCallbacks, returnValue, succeed
</del><ins>+from twisted.internet.defer import inlineCallbacks, returnValue, succeed, \
+ DeferredList
</ins><span class="cx"> from twistedcaldav.config import config
</span><span class="cx"> from txdav.caldav.datastore.sql import CalendarStoreFeatures
</span><span class="cx"> from txdav.common.datastore.sql_tables import schema, _BIND_MODE_OWN
</span><span class="cx"> import datetime
</span><ins>+import itertools
</ins><span class="cx"> import time
</span><span class="cx">
</span><span class="cx"> log = Logger()
</span><span class="lines">@@ -249,13 +251,15 @@
</span><span class="cx"> self, directory,
</span><span class="cx"> updateSeconds=600,
</span><span class="cx"> useDirectoryBasedDelegates=False,
</span><del>- directoryBasedDelegatesSource=None
</del><ins>+ directoryBasedDelegatesSource=None,
+ cacheNotifier=None,
</ins><span class="cx"> ):
</span><span class="cx"> self.directory = directory
</span><span class="cx"> self.useDirectoryBasedDelegates = useDirectoryBasedDelegates
</span><span class="cx"> if useDirectoryBasedDelegates and directoryBasedDelegatesSource is None:
</span><span class="cx"> directoryBasedDelegatesSource = self.directory.recordsWithDirectoryBasedDelegates
</span><span class="cx"> self.directoryBasedDelegatesSource = directoryBasedDelegatesSource
</span><ins>+ self.cacheNotifier = cacheNotifier
</ins><span class="cx"> self.updateSeconds = updateSeconds
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -440,19 +444,30 @@
</span><span class="cx"> )
</span><span class="cx">
</span><span class="cx"> if groupID:
</span><del>- membershipChanged = yield txn.refreshGroup(
</del><ins>+ membershipChanged, addedUIDs, removedUIDs = yield txn.refreshGroup(
</ins><span class="cx"> groupUID, record, groupID,
</span><span class="cx"> cachedName, cachedMembershipHash, cachedExtant
</span><span class="cx"> )
</span><span class="cx">
</span><span class="cx"> if membershipChanged:
</span><span class="cx"> self.log.info(
</span><del>- "Membership changed for group {uid} {name}",
</del><ins>+ "Membership changed for group {uid} {name}:\n\tadded {added}\n\tremoved {removed}",
</ins><span class="cx"> uid=groupUID,
</span><del>- name=cachedName
</del><ins>+ name=cachedName,
+ added=",".join(addedUIDs),
+ removed=",".join(removedUIDs),
</ins><span class="cx"> )
</span><ins>+
+ # Send cache change notifications
+ if self.cacheNotifier is not None:
+ self.cacheNotifier.changed(groupUID)
+ for uid in itertools.chain(addedUIDs, removedUIDs):
+ self.cacheNotifier.changed(uid)
+
+ # Notifier other store APIs of changes
</ins><span class="cx"> wpsAttendee = yield self.scheduleGroupAttendeeReconciliations(txn, groupID)
</span><span class="cx"> wpsShareee = yield self.scheduleGroupShareeReconciliations(txn, groupID)
</span><ins>+
</ins><span class="cx"> returnValue(wpsAttendee + wpsShareee)
</span><span class="cx"> else:
</span><span class="cx"> self.log.debug(
</span><span class="lines">@@ -536,11 +551,24 @@
</span><span class="cx">
</span><span class="cx"> @inlineCallbacks
</span><span class="cx"> def groupsToRefresh(self, txn):
</span><del>- delegatedUIDs = frozenset((yield txn.allGroupDelegates()))
</del><ins>+ delegatedUIDs = set((yield txn.allGroupDelegates()))
</ins><span class="cx"> self.log.info(
</span><span class="cx"> "There are {count} group delegates", count=len(delegatedUIDs)
</span><span class="cx"> )
</span><span class="cx">
</span><ins>+ # Also get group delegates from other pods
+ if txn.directoryService().serversDB is not None and len(txn.directoryService().serversDB.allServersExceptThis()) != 0:
+ results = yield DeferredList([
+ txn.store().conduit.send_all_group_delegates(txn, server) for
+ server in txn.directoryService().serversDB.allServersExceptThis()
+ ], consumeErrors=True)
+ for result in results:
+ if result and result[0]:
+ delegatedUIDs.update(result[1])
+ self.log.info(
+ "There are {count} group delegates on this and other pods", count=len(delegatedUIDs)
+ )
+
</ins><span class="cx"> # Get groupUIDs for all group attendees
</span><span class="cx"> ga = schema.GROUP_ATTENDEE
</span><span class="cx"> gr = schema.GROUPS
</span></span></pre></div>
<a id="CalendarServertrunktxdavwhotesttest_delegatespy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/who/test/test_delegates.py (14155 => 14156)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/who/test/test_delegates.py        2014-11-12 18:05:43 UTC (rev 14155)
+++ CalendarServer/trunk/txdav/who/test/test_delegates.py        2014-11-12 18:09:15 UTC (rev 14156)
</span><span class="lines">@@ -200,7 +200,7 @@
</span><span class="cx"> groupID, name, _ignore_membershipHash, _ignore_modified,
</span><span class="cx"> _ignore_extant
</span><span class="cx"> ) = (yield txn.groupByUID(group1.uid))
</span><del>- _ignore_numAdded, _ignore_numRemoved = (
</del><ins>+ _ignore_added, _ignore_removed = (
</ins><span class="cx"> yield self.groupCacher.synchronizeMembers(txn, groupID, newSet)
</span><span class="cx"> )
</span><span class="cx"> delegates = (yield Delegates.delegatesOf(txn, delegator, True, expanded=True))
</span></span></pre></div>
<a id="CalendarServertrunktxdavwhotesttest_groupspy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/who/test/test_groups.py (14155 => 14156)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/who/test/test_groups.py        2014-11-12 18:05:43 UTC (rev 14155)
+++ CalendarServer/trunk/txdav/who/test/test_groups.py        2014-11-12 18:09:15 UTC (rev 14156)
</span><span class="lines">@@ -131,13 +131,13 @@
</span><span class="cx"> )
</span><span class="cx"> )
</span><span class="cx"> newSet.add(record.uid)
</span><del>- numAdded, numRemoved = (
</del><ins>+ added, removed = (
</ins><span class="cx"> yield self.groupCacher.synchronizeMembers(
</span><span class="cx"> txn, groupID, newSet
</span><span class="cx"> )
</span><span class="cx"> )
</span><del>- self.assertEquals(numAdded, 1)
- self.assertEquals(numRemoved, 2)
</del><ins>+ self.assertEquals(added, set(["__dre1__", ]))
+ self.assertEquals(removed, set(["__glyph1__", "__sagen1__", ]))
</ins><span class="cx"> records = (yield self.groupCacher.cachedMembers(txn, groupID))
</span><span class="cx"> self.assertEquals(
</span><span class="cx"> set([r.shortNames[0] for r in records]),
</span><span class="lines">@@ -145,11 +145,11 @@
</span><span class="cx"> )
</span><span class="cx">
</span><span class="cx"> # Remove all members
</span><del>- numAdded, numRemoved = (
</del><ins>+ added, removed = (
</ins><span class="cx"> yield self.groupCacher.synchronizeMembers(txn, groupID, set())
</span><span class="cx"> )
</span><del>- self.assertEquals(numAdded, 0)
- self.assertEquals(numRemoved, 3)
</del><ins>+ self.assertEquals(added, set())
+ self.assertEquals(removed, set(["__wsanchez1__", "__cdaboo1__", "__dre1__", ]))
</ins><span class="cx"> records = (yield self.groupCacher.cachedMembers(txn, groupID))
</span><span class="cx"> self.assertEquals(len(records), 0)
</span><span class="cx">
</span><span class="lines">@@ -483,7 +483,133 @@
</span><span class="cx"> yield txn.commit()
</span><span class="cx">
</span><span class="cx">
</span><ins>+ @inlineCallbacks
+ def test_groupChangeCacheNotification(self):
+ """
+ Verify refreshGroup() triggers a cache notification for the group and all
+ members that are added or removed
+ """
</ins><span class="cx">
</span><ins>+ class TestNotifier(object):
+ changedTokens = []
+ def changed(self, token):
+ self.changedTokens.append(token)
+
+ self.groupCacher.cacheNotifier = TestNotifier()
+
+ # No change
+ yield self.groupCacher.refreshGroup(self.transactionUnderTest(), "__top_group_1__")
+ yield self.groupCacher.refreshGroup(self.transactionUnderTest(), "__sub_group_1__")
+ yield self.commit()
+
+ self.assertEqual(TestNotifier.changedTokens, [])
+
+ # Add member to group
+ record = yield self.directory.recordWithUID(u"__top_group_1__")
+ addrecord = yield self.directory.recordWithUID(u"__dre1__")
+ yield record.addMembers([addrecord, ])
+
+ yield self.groupCacher.refreshGroup(self.transactionUnderTest(), "__top_group_1__")
+ yield self.commit()
+
+ self.assertEqual(TestNotifier.changedTokens, [
+ "__top_group_1__",
+ "__dre1__",
+ ])
+ TestNotifier.changedTokens = []
+
+ # Remove member from group
+ record = yield self.directory.recordWithUID(u"__top_group_1__")
+ addrecord = yield self.directory.recordWithUID(u"__dre1__")
+ yield record.removeMembers([addrecord, ])
+
+ yield self.groupCacher.refreshGroup(self.transactionUnderTest(), "__top_group_1__")
+ yield self.commit()
+
+ self.assertEqual(TestNotifier.changedTokens, [
+ "__top_group_1__",
+ "__dre1__",
+ ])
+ TestNotifier.changedTokens = []
+
+ # Add member to sub-group
+ record = yield self.directory.recordWithUID(u"__sub_group_1__")
+ addrecord = yield self.directory.recordWithUID(u"__dre1__")
+ yield record.addMembers([addrecord, ])
+
+ yield self.groupCacher.refreshGroup(self.transactionUnderTest(), "__top_group_1__")
+ yield self.commit()
+
+ self.assertEqual(TestNotifier.changedTokens, [
+ "__top_group_1__",
+ "__dre1__",
+ ])
+ TestNotifier.changedTokens = []
+
+ yield self.groupCacher.refreshGroup(self.transactionUnderTest(), "__sub_group_1__")
+ yield self.commit()
+
+ self.assertEqual(TestNotifier.changedTokens, [
+ "__sub_group_1__",
+ "__dre1__",
+ ])
+ TestNotifier.changedTokens = []
+
+ # Remove member from sub-group
+ record = yield self.directory.recordWithUID(u"__sub_group_1__")
+ addrecord = yield self.directory.recordWithUID(u"__dre1__")
+ yield record.removeMembers([addrecord, ])
+
+ yield self.groupCacher.refreshGroup(self.transactionUnderTest(), "__top_group_1__")
+ yield self.commit()
+
+ self.assertEqual(TestNotifier.changedTokens, [
+ "__top_group_1__",
+ "__dre1__",
+ ])
+ TestNotifier.changedTokens = []
+
+ yield self.groupCacher.refreshGroup(self.transactionUnderTest(), "__sub_group_1__")
+ yield self.commit()
+
+ self.assertEqual(TestNotifier.changedTokens, [
+ "__sub_group_1__",
+ "__dre1__",
+ ])
+ TestNotifier.changedTokens = []
+
+ # Remove sub-group member from group
+ record = yield self.directory.recordWithUID(u"__top_group_1__")
+ addrecord = yield self.directory.recordWithUID(u"__sub_group_1__")
+ yield record.removeMembers([addrecord, ])
+
+ yield self.groupCacher.refreshGroup(self.transactionUnderTest(), "__top_group_1__")
+ yield self.commit()
+
+ self.assertEqual(TestNotifier.changedTokens, [
+ "__top_group_1__",
+ "__sagen1__",
+ "__cdaboo1__",
+ ])
+ TestNotifier.changedTokens = []
+
+ # Add sub-group member to group
+ record = yield self.directory.recordWithUID(u"__top_group_1__")
+ addrecord = yield self.directory.recordWithUID(u"__sub_group_1__")
+ yield record.addMembers([addrecord, ])
+
+ yield self.groupCacher.refreshGroup(self.transactionUnderTest(), "__top_group_1__")
+ yield self.commit()
+
+ self.assertEqual(TestNotifier.changedTokens, [
+ "__top_group_1__",
+ "__sagen1__",
+ "__cdaboo1__",
+ ])
+ TestNotifier.changedTokens = []
+
+
+
</ins><span class="cx"> class DynamicGroupTest(StoreTestCase):
</span><span class="cx">
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>