major
minor
major
minor
minor
#27015
Logging in KBDataProducerTask should cover error cases better
Logging in the tl:KBDataProducerTask is often insufficient when errors occur. However, since problems unfortunately arise frequently in this area due to the inherent complexity of distributed applications, it is particularly important here to have helpful log messages.
Improvement
- If the task aborts, it logs the revisions at which this occurs.
- If exceptions occur, they will always be logged—even if they are subsequently rethrown.
- If an exception is propagated but another exception is thrown within a ` finally ` block, neither is suppressed. Both are ultimately logged.
- The task logs at the DEBUG level as soon as another changeset has been transferred.
- Logging in the task has been generally expanded.
- To log progress during the task, logging has been implemented in the tl:TypeFilterRewriter.
- The current status is logged every minute.
- The interval is configurable.
- For "large" changesets, the number of events is logged in advance.
- The threshold for "large" is configurable. The default value is 1,000.
- The current status is logged every minute.
Code Migration
The TaskResult.TaskResultsByDateComparator class has been removed and replaced with the expression Comparator.comparing(TaskResult::getStartDate).
Test
No test.
Reason: This is difficult to test. Random parts of the tl:KBDataProducerTask would have to be broken and checked to ensure that all relevant exceptions and data are always logged. While there are frameworks available to test how code behaves when exceptions are thrown at random points, integrating something like that here would be far too time-consuming for this purpose. Therefore, there is neither an automated test nor a manual one.