Page MenuHomePhabricator

Migrate the draft translation restore mechanism to use data from cx_corpora table
Closed, ResolvedPublic

Description

As we started saving the secion-level data in cxc_corpora table, The document level data saved in cx_drafts table is redundant. But our translation draft restore mechanism relies on that table. We need a way to switch draft restore mechanism to corpora table . This should not affect any existing functionality at all too. I have the following rough idea:

  • ApiQueryContentTranslation should check if there is a saved data for the given translation id in cxc_corpora table. If so access the data from there , aggregate the sections in their linear order and return it.
    • If the data is not present in corpora table, check that in drafts table and fetch it.
    • Whenever we save the data to corpora table, remove the entry from drafts table asynchronously(not blocking the request).
  • Once the above steps are done stop saving the entire translation as part of autosave.
  • Still there will be entries left in drafts table since there are translations kind of abandoned or not used recently. We will have to do some notification to translators and remove them after a defined time. (this can be a separate ticket, outside the scope of this ticket).

In effect, the autosave mechanism should become granular.

Event Timeline

santhosh created this task.Jan 22 2016, 9:44 AM
santhosh updated the task description. (Show Details)
santhosh raised the priority of this task from to High.
santhosh claimed this task.
santhosh renamed this task from Migrate the draft translation restore mechanism from cx_corpora table to Migrate the draft translation restore mechanism to use data from cx_corpora table.
santhosh set Security to None.
santhosh updated the task description. (Show Details)
santhosh added subscribers: jmadler, Pginer-WMF, Equ and 12 others.
Amire80 moved this task from Needs Triage to CX8 on the ContentTranslation board.Feb 2 2016, 8:01 PM
santhosh removed santhosh as the assignee of this task.Feb 3 2016, 10:55 AM
KuboF removed a subscriber: KuboF.Feb 6 2016, 4:46 PM
santhosh claimed this task.Feb 8 2016, 12:23 PM
santhosh moved this task from Backlog to In Review on the LE-CX8-Sprint 2 board.

Change 268645 had a related patch set uploaded (by Santhosh):
ApiQueryContentTranslation: Restore the saved translation from cxc_corpora table

https://gerrit.wikimedia.org/r/268645

Nikerabbit moved this task from Backlog to In Review on the LE-CX8-Sprint 3 board.Feb 16 2016, 6:57 AM
Nikerabbit moved this task from In Review to Blocked on the LE-CX8-Sprint 3 board.Feb 24 2016, 1:25 PM

Change 268645 merged by jenkins-bot:
Restore the saved translation from cxc_corpora table

https://gerrit.wikimedia.org/r/268645

Nikerabbit moved this task from Blocked to QA on the LE-CX8-Sprint 3 board.Feb 26 2016, 5:35 PM
Arrbee closed this task as Resolved.
Arrbee moved this task from QA to Done on the LE-CX8-Sprint 3 board.