Exemple #1
0
        private void compactTSMLevel(bool fast, int level)
        {
            CompactionStrategy s = levelCompactionStrategy(fast, level);

            if (s != null)
            {
                s.Apply();
                compactionPlan.Release(s.compactionGroups);
            }
        }
Exemple #2
0
        private void compactTSMFull()
        {
            bool cold = shard.IsOld() &&
                        DateTime.Now.Ticks - LastModified() > Constants.DefaultCompactFullWriteColdDuration;

            if (cold)
            {
                compactionPlan.ForceFull();
                quitCompact.Cancel();
                quitCompact = null;
            }
            CompactionStrategy s = fullCompactionStrategy();

            if (s != null)
            {
                s.Apply();
                compactionPlan.Release(s.compactionGroups);
            }
        }