-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add console commands for Export, Import. Including chunking. Improve Ticket import. #3682
Comments
Tentatively added the commands. TODO:
Additional fixes to Import Export:
|
This allows concatenation of CSV files
mostly as an example that this can be done. The pragma make the character class `\d` behave like `[0-9]`.
The current state is available at https://github.com/RotherOSS/otobo/tree/issue-%233682-importexport_with_chunking. |
Another thing to discuss: The new files Kernel/System/Console/Command/Admin/ImportExport/Import.pm and Kernel/System/Console/Command/Admin/ImportExport/Export.pm are planned to be added to OTOBO 11.1. For OTOBO 11.0 the plan is to backport these files to the ImportExportTicket package. It can be considered to integrated the two files from ImportExportTicket into OTOBO 11.1.
This would allow to mark ImportExportTicket simply as integrated, without having to consider the two different cases. |
This allows concatenation of CSV files
mostly as an example that this can be done. The pragma make the character class `\d` behave like `[0-9]`.
on a per ticket basis, not at the end of processing
as the return value of TemplateGet() might be undefined
because the config changes are specific for the ImportExport of tickets.
as the return value of TemplateGet() might be undefined
because the config changes are specific for the ImportExport of tickets.
The adaptions were up to now done for OTOBO 11.1.x. But that is currently not very useful as this version is not released yet. So let's backport it to OTOBO r11.0.x. As no new features should be added in a patch level release, lets include it into the master branch of https://github.com/RotherOSS/ImportExportTicket. |
Some more analysis about the core dump. The suspicion is that the stack size or 8 MB is running out. This could be due to XS-code. Two candidates are Text::CSV_XS and the database driver. It does not look like the reading of the CSV file is the problem. The 209661 lines, corresponding to 50000 entities, of the test iinput can be read in without problems. It is just not clear why the whole file must be read in before parsing begins. It also looks like the chunking is not really the problem, when importing the combined file the core dump happens after importing 8735 tickets. That is the same ballpark as with chunked import. Another wild guess. |
The wild idea migth have had an effect. With a small code change in
But after the last imported ticket there was still a core dump. I suspect that TODO:
|
Another experiment. First I rolled back the changes in All 10.000 tickets were imported. During the imports the stack size grew in the same way as without the adapted DB module.
As the end I briefly say a stack size of over 6000 kB and core was dumped. So this is the first real indication that the stack size limit is reached, presumable during global destruction. The ulimit for stacksize, |
for some articles the transactions will be handled before creating an article for the next ticket or during global desctruction
for some articles the transactions will be handled before creating an article for the next ticket or during global desctruction
Activated the early triggering of the article transactions. Article transaction are handled just before the next article is created. Some observations:
TODO:
|
More experiments. Removing all event handlers still let the stack size grow. So the problem is likely not in one of the event handlers. Disabling
The stack size is no longer growing. So disabling EventHandlerTransaction() is recommended for the upcoming test migration. The reason why the stack size increases is not obvious. I likely has to do with the localized object manager which is destroyed and EventHandlerTransaction() is called again in the destructor. TODO:
|
Turns out that this is apparently caused by The fix is to avoid recreating TODO:
|
because calling binmode often exhausts the stash and causes core dumps. Relevant for console commands that often call EventHandlerTransaction().
because calling binmode often exhausts the stash and causes core dumps. Relevant for console commands that often call EventHandlerTransaction().
The core dump issue looks like it is solved. Got about 300 kB Stacksize after importing 10000 tickets via the console command. |
TODO:
|
Harald Jörg kindly analyzed the behavior of |
quite sensible, that last line of the CSV export now has a newline at the end of the line
quite sensible, that last line of the CSV export now has a newline at the end of the line
ImportExportTicket has been integrated into OTOBO 11.1. Closing this issue. |
ImportExport is integrated in OTOBO 11.0 and OTOBO 11.1. But there are no console commands that perform Import and Export. So let's provide them. The new commands will be almost exact copies of the commands in ITSMConfigurationManagement, https://github.com/RotherOSS/ITSMConfigurationManagement/tree/master/Kernel/System/Console/Command/Admin/ITSM/ImportExport .
Support for chunking will be added to the commands and to the Translations object backed. Chunking the translations is basically only meant as an example, as it is unlikely that translation will exhaust the machines memory.
Do not add the commands in rel-11_0, as patch releases should have no new features.
The text was updated successfully, but these errors were encountered: