On Sun, Jun 11, 2017 at 8:21 AM, John D. Ament <johndam...@apache.org> wrote: > On Sun, Jun 11, 2017 at 8:15 AM Sam Ruby <ru...@intertwingly.net> wrote: > >> On Sun, Jun 11, 2017 at 8:05 AM, John D. Ament <johndam...@apache.org> >> wrote: >> > On Sat, Jun 10, 2017 at 11:51 AM sebb <seb...@gmail.com> wrote: >> > >> >> On 10 June 2017 at 15:52, John D. Ament <johndam...@apache.org> wrote: >> >> > I think there's a bug with how the caching works for podlings.xml, but >> >> I'm >> >> > not sure if it's something I introduced or something I'm just >> noticing. >> >> > >> >> > I would expect that the cache is comparing podlings.json to >> podlings.xml. >> >> > If podlings.json mod time is newer than podlings.xml, read the values >> >> from >> >> > there. Otherwise, refresh from the xml file. >> >> > >> >> > Presently, it looks like we're checking the cache folder for the xml >> file >> >> > and re-reading that. >> >> > >> >> > Thoughts? >> >> >> >> I'm not sure what you are referring to here. >> >> >> > >> > >> https://github.com/apache/whimsy/blob/master/lib/whimsy/asf/podlings.rb#L304 >> > >> > I'm not sure if I'm not reading this properly or what (granted I'm a ruby >> > n00b). It seems like all this is doing is reading podlings.xml from a >> > different location on the file system instead of leveraging a pre-built >> > cache of the podling structure. Basically, I don't understand what >> > performance boost this cache is giving us in the current structure. >> >> That's not reading podlings.xml; that's issuing a request to JIRA to >> list all of the issues that have ever been raised against the >> podlingnamesearch project. Those types of requests take time and >> resources across multiple machines. >> >> This information is used by, for example, the board agenda tool. So >> instead of sending a request each time the board agenda is loaded, it >> will send a request at most every five minutes. >> >> > Sorry, I clicked the wrong line - > https://github.com/apache/whimsy/blob/master/lib/whimsy/asf/podlings.rb#L110
OK, so that's got a different explanation. There is a copy of podlings.xml which is checked out and updated every 10 minutes. The file permissions on that file don't allow www-data (the user under which the ASF server runs) to update it. Now you go into roster/ppmc/foobar and add a mentor. This updates the file in svn. But you won't otherwise see it show up in the roster tool until svn updates. What to do? Well, the current code places a copy of the updated file into the cache directory and the code that parses chooses the later version of the two. The original whimsy-vm (we now are on whimsy-vm4) used to instead update the svn directory in place. But that was a mess - having multiple processes do updates in a single directory and using svn commands that would sometimes fail unpredictably would often require a manual cleanup. - Sam Ruby