We're updating the issue view to help you get more done.Learn more

Many Activity transactions are triggered by a single document upload

When uploading a large translation document, we commit in batches of 100 TextFlowTargets, but we fire a TextFlowTargetStateEvent for each TFT. The event handler for TextFlowTargetStateEvent (ie ActivityServiceImpl.logTextFlowStateUpdate) then generates a separate transaction for every one of these events, all of which are updating a single row of the database (the Activity entry for the document).

This leads to 101 transactions per batch, instead of one or two.

We should find a way to aggregate these activities. For instance, perhaps TranslationServiceImpl.translateAllInDoc should fire a single event per document which triggers a single transaction against the Activity table.

Status

Assignee

Unassigned

Reporter

Sean Flanigan

Labels

Story point estimate

3

Epic Link

Priority

unspecified