/** * Issue any synchronization and test needed before applying the update * For compacting memstore this means checking the update can increase the size without * overflow * @param currentActive the segment to be updated * @param cell the cell to be added * @param memstoreSizing object to accumulate region size changes * @return true iff can proceed with applying the update */ @Override protected boolean preUpdate(MutableSegment currentActive, Cell cell, MemStoreSizing memstoreSizing) { if (currentActive.sharedLock()) { if (checkAndAddToActiveSize(currentActive, cell, memstoreSizing)) { return true; } currentActive.sharedUnlock(); } return false; }