コード例 #1
0
ファイル: TableIndex.cs プロジェクト: kirinse/EventStore
 public void TryManualMerge()
 {
     lock (_awaitingTablesLock) {
         var(maxLevel, highest) = _indexMap.GetTableForManualMerge();
         if (highest == null)
         {
             return;                                  //no work to do
         }
         //These values are actually ignored later as manual merge will never change the checkpoint as no
         //new entries are added, but they can be helpful to see when the manual merge was called
         //because of the way the "queue" currently works (LIFO) it should always be the same
         var prepare   = _indexMap.PrepareCheckpoint;
         var commit    = _indexMap.CommitCheckpoint;
         var newTables = new List <TableItem>(_awaitingMemTables)
         {
             new TableItem(highest, prepare, commit, maxLevel)
         };
         _awaitingMemTables = newTables;
         TryProcessAwaitingTables();
     }
 }