Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

Commit

Permalink
Moved ticket number counter from the TicketCounter.log file to the da…
Browse files Browse the repository at this point in the history
…tabase. Added ExclusiveLock API for coopoerative, application-level locking via database. This allows OTRS to process incoming e-mails much faster and in parallel.

Notify: gsd@otrs.com, tech@otrs.com
  • Loading branch information
carlosfrodriguez authored and mgruner committed May 15, 2017
1 parent a0de74b commit 4cb0ba4
Show file tree
Hide file tree
Showing 33 changed files with 3,060 additions and 369 deletions.
6 changes: 3 additions & 3 deletions .procmailrc.dist
Expand Up @@ -68,12 +68,12 @@ COMSAT=no

# Pipe all email into the PostMaster process.

:0 w:
:0 w
| $SYS_HOME/bin/otrs.Console.pl Maint::PostMaster::Read


# spool all the rest (which the otrs.PostMaster.pl can't process!)
# If the database is down or the otrs.PostMaster.pl exit was not '0'!
# Spool all the rest (which the console command 'Maint::PostMaster::Read' can't process!)
# If the database is down or the console command 'Maint::PostMaster::Read' does not return success!

:0 :
$SYS_HOME/var/spool/.
Expand Down
1 change: 1 addition & 0 deletions CHANGES.md
@@ -1,4 +1,5 @@
#6.0.0.beta1 2017-??-??
- 2017-05-15 Moved ticket number counter from the TicketCounter.log file to the database. Added ExclusiveLock API for coopoerative, application-level locking via database. This allows OTRS to process incoming e-mails much faster and in parallel.
- 2017-05-11 Fixed bug#[10509](https://bugs.otrs.org/show_bug.cgi?id=10509) - Incorrect handling of empty mime parts.
- 2017-05-11 Fixed bug#[11910](https://bugs.otrs.org/show_bug.cgi?id=11910) - URLs sometimes get replaced with [#####] characters.
- 2017-05-11 Fixed bug#[12442](https://bugs.otrs.org/show_bug.cgi?id=12442) - Add-ons verification fails in some Oracle configurations because they are stored as CHAR instead of BLOB.
Expand Down
19 changes: 18 additions & 1 deletion Kernel/Config/Files/Daemon.xml
Expand Up @@ -795,5 +795,22 @@
</Hash>
</Setting>
</ConfigItem>

<ConfigItem Name="Daemon::SchedulerCronTaskManager::Task###TicketNumberCounterCleanup" Required="1" Valid="1" ConfigLevel="100">
<Description Translatable="1">Removes old ticket number counters (Sunday mornings).</Description>
<Group>Daemon</Group>
<SubGroup>Daemon::SchedulerCronTaskManager::Task</SubGroup>
<Setting>
<Hash>
<Item Key="TaskName">TicketNumberCounterCleanup</Item>
<Item Key="Schedule">*/10 * * * *</Item> <!-- each 10 mins -->
<Item Key="Module">Kernel::System::Ticket::Number::AutoIncrement</Item> <!-- use AutoIncrement to have access to the base function. -->
<Item Key="Function">TicketNumberCounterCleanup</Item>
<Item Key="MaximumParallelInstances">1</Item>
<Item Key="Params">
<Array>
</Array>
</Item>
</Hash>
</Setting>
</ConfigItem>
</otrs_config>
2 changes: 1 addition & 1 deletion Kernel/Config/Files/Ticket.xml
Expand Up @@ -230,7 +230,7 @@
</Setting>
</ConfigItem>
<ConfigItem Name="Ticket::NumberGenerator" Required="1" Valid="1">
<Description Translatable="1">Selects the ticket number generator module. "AutoIncrement" increments the ticket number, the SystemID and the counter are used with SystemID.counter format (e.g. 1010138, 1010139). With "Date" the ticket numbers will be generated by the current date, the SystemID and the counter. The format looks like Year.Month.Day.SystemID.counter (e.g. 200206231010138, 200206231010139). With "DateChecksum" the counter will be appended as checksum to the string of date and SystemID. The checksum will be rotated on a daily basis. The format looks like Year.Month.Day.SystemID.Counter.CheckSum (e.g. 2002070110101520, 2002070110101535). "Random" generates randomized ticket numbers in the format "SystemID.Random" (e.g. 100057866352, 103745394596).</Description>
<Description Translatable="1">Selects the ticket number generator module. "AutoIncrement" increments the ticket number, the SystemID and the counter are used with SystemID.counter format (e.g. 1010138, 1010139). With "Date" the ticket numbers will be generated by the current date, the SystemID and the counter. The format looks like Year.Month.Day.SystemID.counter (e.g. 200206231010138, 200206231010139). With "DateChecksum" the counter will be appended as checksum to the string of date and SystemID. The checksum will be rotated on a daily basis. The format looks like Year.Month.Day.SystemID.Counter.CheckSum (e.g. 2002070110101520, 2002070110101535).</Description>
<Group>Ticket</Group>
<SubGroup>Core::Ticket</SubGroup>
<Setting>
Expand Down
18 changes: 17 additions & 1 deletion Kernel/Config/Files/XML/Daemon.xml
Expand Up @@ -740,5 +740,21 @@
</Hash>
</Value>
</Setting>

<Setting Name="Daemon::SchedulerCronTaskManager::Task###TicketNumberCounterCleanup" Required="1" Valid="1" ConfigLevel="100">
<Description Translatable="1">Removes old ticket number counters (Sunday mornings).</Description>
<Navigation>Daemon::SchedulerCronTaskManager::Task</Navigation>
<Value>
<Hash>
<Item Key="TaskName">TicketNumberCounterCleanup</Item>
<Item Key="Schedule">*/10 * * * *</Item> <!-- each 10 mins -->
<Item Key="Module">Kernel::System::Ticket::Number::AutoIncrement</Item> <!-- use AutoIncrement to have access to the base function. -->
<Item Key="Function">TicketNumberCounterCleanup</Item>
<Item Key="MaximumParallelInstances">1</Item>
<Item Key="Params">
<Array>
</Array>
</Item>
</Hash>
</Value>
</Setting>
</otrs_config>
2 changes: 1 addition & 1 deletion Kernel/Config/Files/XML/Ticket.xml
Expand Up @@ -174,7 +174,7 @@
</Value>
</Setting>
<Setting Name="Ticket::NumberGenerator" Required="1" Valid="1">
<Description Translatable="1">Selects the ticket number generator module. "AutoIncrement" increments the ticket number, the SystemID and the counter are used with SystemID.counter format (e.g. 1010138, 1010139). With "Date" the ticket numbers will be generated by the current date, the SystemID and the counter. The format looks like Year.Month.Day.SystemID.counter (e.g. 200206231010138, 200206231010139). With "DateChecksum" the counter will be appended as checksum to the string of date and SystemID. The checksum will be rotated on a daily basis. The format looks like Year.Month.Day.SystemID.Counter.CheckSum (e.g. 2002070110101520, 2002070110101535). "Random" generates randomized ticket numbers in the format "SystemID.Random" (e.g. 100057866352, 103745394596).</Description>
<Description Translatable="1">Selects the ticket number generator module. "AutoIncrement" increments the ticket number, the SystemID and the counter are used with SystemID.counter format (e.g. 1010138, 1010139). With "Date" the ticket numbers will be generated by the current date, the SystemID and the counter. The format looks like Year.Month.Day.SystemID.counter (e.g. 200206231010138, 200206231010139). With "DateChecksum" the counter will be appended as checksum to the string of date and SystemID. The checksum will be rotated on a daily basis. The format looks like Year.Month.Day.SystemID.Counter.CheckSum (e.g. 2002070110101520, 2002070110101535).</Description>
<Navigation>Core::Ticket</Navigation>
<Value>
<Item ValueType="PerlModule" ValueFilter="Kernel/System/Ticket/Number/*.pm">Kernel::System::Ticket::Number::DateChecksum</Item>
Expand Down

0 comments on commit 4cb0ba4

Please sign in to comment.