Class CreateSyntheticHistoryEntriesAction

  • All Implemented Interfaces:
    java.lang.Runnable

    public class CreateSyntheticHistoryEntriesAction
    extends java.lang.Object
    implements java.lang.Runnable
    A mapreduce that creates synthetic history objects in SQL for all EppResource objects.

    Certain operations, e.g. RdeStagingAction or GenerateZoneFilesAction, require that we are able to answer the question of "What did this EPP resource look like at a point in time?" In the Datastore world, we are able to answer this question using the commit logs, however this is no longer possible in the SQL world. Instead, we will use the history objects, e.g. DomainHistory to see what a particular resource looked like at that point in time, since history objects store a snapshot of that resource.

    This command creates a synthetic history object at the current point in time for every single EPP resource to guarantee that later on, when examining in-the-past resources, we have some history object for which the EppResource field is filled. This synthetic history object contains basically nothing and its only purpose is to create a populated history object in SQL through asynchronous replication.

    NB: This class operates entirely in Datastore, which may be counterintuitive at first glance. However, since this is meant to be run during the Datastore-primary, SQL-secondary stage of the migration, we want to make sure that we are using the most up-to-date version of the data. The resource field of the history objects will be populated during asynchronous migration, e.g. in DomainHistory.beforeSqlSaveOnReplay().

    • Method Detail

      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable