optimize table locking of segment meta table in termtagger import

XMLWordPrintable

    • Type: Task
    • Resolution: Unresolved
    • None
    • Affects Version/s: None
    • Component/s: None

      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)

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

              Created:
              Updated: