Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/29/20 13:28:25 (5 years ago)
Author:
jkarder
Message:

#3062: overhauled statistics generation and cleanup

  • switched to a single thread for database cleanup and statistics generation (executed sequentially)
  • switched to preemptive deletion of items that are in status DeletionPending (for jobs: statelogs, taskdata, tasks)
  • added code that aborts tasks whose jobs have already been marked for deletion
  • added method UseTransactionAndSubmit in addition to UseTransaction in PersistenceManager
  • updated DAO methods and introduced more bare metal sql
  • introduced DAO methods for batch deletion
  • fixed usage of enum values in DAO sql queries
  • deleted unnecessary triggers tr_JobDeleteCascade and tr_TaskDeleteCascade in Prepare Hive Database.sql
  • changed scheduling for less interference with janitor and other heartbeats
    • increased scheduling patience from 20 to 70 seconds (to wait longer to get the mutex for scheduling)
    • changed signature of ITaskScheduler.Schedule
    • added base class for TaskSchedulers and moved assignment of tasks to slaves into it
    • changed RoundRobinTaskScheduler to use bare metal sql
  • made MessageContainer a storable type (leftover)
  • updated HiveJanitorServiceInstaller.nsi
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Services.Hive.JanitorService/3.3/JanitorService.cs

    r17180 r17574  
    2626  public partial class JanitorService : ServiceBase {
    2727    private HiveJanitor janitor;
    28     private Thread janitorCleanupThread;
    29     private Thread janitorGenerateStatisticsThread;
     28    private Thread janitorThread;
    3029
    3130    public JanitorService() {
     
    3635      janitor = new HiveJanitor();
    3736
    38       janitorCleanupThread = new Thread(janitor.RunCleanup) {
    39         IsBackground = true
    40       };
    41       janitorGenerateStatisticsThread = new Thread(janitor.RunGenerateStatistics) {
     37      janitorThread = new Thread(janitor.Run) {
    4238        IsBackground = true
    4339      };
    4440
    45       janitorCleanupThread.Start();
    46       janitorGenerateStatisticsThread.Start();
     41      janitorThread.Start();
    4742    }
    4843
    4944    protected override void OnStop() {
    5045      janitor.StopJanitor();
    51       janitorCleanupThread.Join();
    52       janitorGenerateStatisticsThread.Join();
     46      janitorThread.Join();
    5347    }
    5448  }
Note: See TracChangeset for help on using the changeset viewer.