Hi Ryan, after reading through all related stuff I’ve seen this comment https://trac-hacks.org/ticket/7884#comment:5 where someone replied to my comment:4 and tells about hanging server. After using the regexp proposed in comment:5 this is fixed. Sorry, that I didn’t see that earlier.
I added this pattern on page https://trac-hacks.org/wiki/TracTicketChangelogPlugin with revision 23<https://trac-hacks.org/wiki/TracTicketChangelogPlugin%20with%20revision%2023> so others can find this faster. Regards Torge Von: [email protected] [mailto:[email protected]] Im Auftrag von RjOllos Gesendet: Montag, 28. Dezember 2015 22:41 An: Trac Users <[email protected]> Cc: [email protected]; [email protected] Betreff: Re: [Trac] Re: [TracTicketChangeLogPlugin] Failiing to display tickets with long revision messages On Friday, December 25, 2015 at 1:54:43 AM UTC-8, Torge Riedel wrote: Am 24.12.2015 um 02:13 schrieb RjOllos: > > > On Wednesday, December 23, 2015 at 9:39:06 AM UTC-8, RjOllos wrote: > > > > On Wednesday, December 23, 2015 at 3:42:43 AM UTC-8, Torge Riedel wrote: > > Am 22.12.2015 um 19:07 schrieb RjOllos: > > > > > > On Monday, December 21, 2015 at 6:37:36 AM UTC-8, Riedel, Torge > wrote: > > > > Hi, > > > > today I faced a problem with TracTicketChangeLogPlugin: > > > > After analyzing the code and adding some debug outputs I can > say the following: > > > > 1.Ticket number is #39 > > > > 2.The db-query gives 46 revisions where LIKE '%#39%' matches > (which is much more than really necessary, since revisions referencing > tickets e.g. #391 are returned too) > > > > 3.The reg-ex matching hangs when there is a long commit > message (sorry I cannot post it here since it contains confidential > information) > > > > a.The message contains Unicode chars, but changing the > encoding of the message to match to ‘ascii’ with ‘ignore’ option does not help > > > > b.The message has 41 lines (it’s a message of a tag commit in > subversion, where we list all tickets solved in this version, the format is: > > Version vX.Y > > ---- > > * #n1 Fixed this > > * #n2 Fixed that > > … and so on > > > > c.The whole message has a count of 3073 chars > > > > The log pattern is configured to: > > > > [ticketlog] > > > > log_pattern = (\n|.)*#%s($|\D(\n|.)*) > > > > Which gives very good results. In general. Since I’m not a > python developer, help is appreciated. > > > > Regards > > > > Torge > > > > > > You could try the patterns mentioned in this ticket: > > https://trac-hacks.org/ticket/7884 > <https://trac-hacks.org/ticket/7884> > > See also: > > https://trac-hacks.org/ticket/12436 > <https://trac-hacks.org/ticket/12436> > > > > I suspect the issue you describe as "hanging on a long commit > message" is due to searching every log message on every request. I hope to > fix that in #11821, but I don't have a timetable yet for implementing the > changes. > > https://trac-hacks.org/ticket/11821 > <https://trac-hacks.org/ticket/11821> > > > > - Ryan > > > > -- > > You received this message because you are subscribed to the Google > Groups "Trac Users" group. > > To unsubscribe from this group and stop receiving emails from it, > send an email to > [email protected]<mailto:trac-users%[email protected]> > > <mailto:trac-users%[email protected]<mailto:trac-users%[email protected]>> > > <mailto:[email protected]<mailto:trac-users%[email protected]> > > <mailto:trac-users%[email protected]<mailto:trac-users%[email protected]>>>. > > To post to this group, send email to > [email protected]<mailto:[email protected]> > <mailto:[email protected]<mailto:[email protected]>> > <mailto:[email protected]<mailto:[email protected]> > <mailto:[email protected]<mailto:[email protected]>>>. > > Visit this group at https://groups.google.com/group/trac-users > <https://groups.google.com/group/trac-users>. > > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. > > Hi Ryan, > > well my issue is not really due to the number of log messages. There > is a pre-selection of the log messages by a SELECT-query using a "LIKE" on > the message. I added debug prints in the plug-in, activated the log to the > file in the trac instance and called "tail -f trac.log" to see what happens > when visiting the ticket page. And I see that the long message (it is the > 11th of 46 log messages to check) is passed to the re.match()-method and then > nothing more is logged. Apache is no more responding to other requests. > Maybe this is a bug in python regex code? Can you help me to check > this? I'm not a python developer so I need help. Everything more complex than > adding debug prints is out of my possibilities! ;-) I think of a small python > script where I can pass the ticket id ("python test.py 39") executed in the > directory where the trac.db is located. This script is running the code > snippet of the plug-in with log of debug prints. So I can check whether this > is a python issue and maybe it's possible for me to reduce it to > non-confidential data and open an issue. > > Thanks > Torge > > > #11821 also proposes to improve the regex. I think we should only extract > tokens like "Refs #1", rather than just "#1", like CommitTicketUpdater does. > Approximately how many tickets are referenced in the log message? > > - Ryan > > > Are your ticket references of the form #\d+, or do you prefix the ticket ID > references in your log messages #\d+ with a CommitTicketUpdater command? > http://trac.edgewall.org/wiki/CommitTicketUpdater#Configure > > - Ryan Well, it's a tag commit where we always list all fixed issues. The message has 41 lines, two lines for version and horizontal delimiter -> 39 ticket references. Our format is always like this: Version vX.Y ---- * #n1 Fixed this * #n2 Fixed that ... Where "..." stands for more list points. We do not use CommitTicketUpdater. Again: It looks to me, that regex engine of python is hanging when trying to find a match for (\n|.)*#39($|\D(\n|.)*) in the long message. I like to verify this using a small python script, but I'm not a python developer. Improving the regex is only one solution and - in my case - not suitable if the reference format changes. This would skip all existing commits ins svn, where the new format is not used. BTW: Merry christmas! Regards Torge Thank you for the additional details. I added a note to #12621 to investigate. I'll try to make those changes backward compatible. I think it would be best to continue the discussion in ticket #12621, so you can receive notifications of changesets. - Ryan -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To post to this group, send email to [email protected]<mailto:[email protected]>. Visit this group at https://groups.google.com/group/trac-users. For more options, visit https://groups.google.com/d/optout. CENIT AG, Industriestrasse 52-54, 70565 Stuttgart, Tel.: +49 711 7825-30, Fax: +49 711 7825-4000, Internet: www.cenit.com Geschaeftsstellen: Berlin, Frankfurt, Hamburg, Hannover, Muenchen, Oelsnitz, Ratingen, Saarbruecken Vorstandsmitglieder: Kurt Bengel, Matthias Schmidt Aufsichtsratsmitglieder: Andreas Schmidt (Vorsitzender des Aufsichtsrats), Hubert Leypoldt, Andreas Karrer Bankverbindungen: Deutsche Bank (BLZ 600 700 70) Kto. 1661 040 IBAN : DE85 6007 0070 0166 1040 00 SWIFT-CODE : DEUTDESS, Commerzbank (BLZ 600 400 71) Kto. 532 015 500 IBAN : DE83 6004 0071 0532 0155 00 SWIFT-Code : COBADEFF600, Registergericht: Amtsgericht Stuttgart Handelsregister: HRB Nr. 19117 Umsatzsteuer: ID-Nr. DE 147 862 777 -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/trac-users. For more options, visit https://groups.google.com/d/optout.
