Uploaded image for project: 'translate5'
  1. translate5
  2. TRANSLATE-351

optimize table locking of segment meta table in termtagger import

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      Currently the TermTaggerImport locks a bunch of tables to get the next segments which are to be tagged.
      This could be improved by doing the following steps:

      1. Instead of creating the segment meta entries only for the selected X segments we could create all segment meta entries for all segments of the Task in a first step (insert into LEK_segment_meta values select segmentId, taskGuid from LEK_segments where taskGuid = ?; Add a duplicate key update (or better ignore if possible) statement to the insert).
      2. refactor the getNextSegmentSelect so that it does a "select for update" call which hopefully locks the affected rows then.
      3. refactor the later foreach meta->save() to one update statement which sets the state for all segmentIds in (the above fetched ones)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tlauria Thomas Lauria
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: