@Override public boolean compactionStart(long targetPageCount) throws IOException { mCommitLock.acquireExclusive(); try { return mPageManager.compactionStart(targetPageCount); } catch (Throwable e) { throw closeOnFailure(e); } finally { mCommitLock.releaseExclusive(); } }
@Override public boolean compactionStart(long targetPageCount) throws IOException { mCommitLock.acquireExclusive(); try { return mPageManager.compactionStart(targetPageCount); } catch (Throwable e) { throw closeOnFailure(e); } finally { mCommitLock.releaseExclusive(); } }
@Override public boolean compactionStart(long targetPageCount) throws IOException { mCommitLock.acquireExclusive(); try { return mPageManager.compactionStart(targetPageCount); } catch (Throwable e) { throw closeOnFailure(e); } finally { mCommitLock.releaseExclusive(); } }
@Override public boolean compactionStart(long targetPageCount) throws IOException { mCommitLock.acquireExclusive(); try { return mPageManager.compactionStart(targetPageCount); } catch (Throwable e) { throw closeOnFailure(e); } finally { mCommitLock.releaseExclusive(); } }
@Override public boolean compactionStart(long targetPageCount) throws IOException { mCommitLock.acquireExclusive(); try { return mPageManager.compactionStart(targetPageCount); } catch (Throwable e) { throw closeOnFailure(e); } finally { mCommitLock.releaseExclusive(); } }
@Override public boolean compactionStart(long targetPageCount) throws IOException { mCommitLock.acquireExclusive(); try { return mPageManager.compactionStart(targetPageCount); } catch (Throwable e) { throw closeOnFailure(e); } finally { mCommitLock.releaseExclusive(); } }
/** * @return false if aborted */ public boolean compactionEnd(CommitLock commitLock) throws IOException { // Default will reclaim everything. long upperBound = Long.MAX_VALUE; boolean ready = compactionVerify(); // Need exclusive commit lock to prevent delete and recycle from attempting to operate // against a null reserve list. A race condition exists otherwise. Acquire full lock // too out of paranoia. commitLock.acquireExclusive(); fullLock(); if (ready && (ready = mCompacting && (mTotalPageCount > mCompactionTargetPageCount || mPageArray.getPageCount() > mTotalPageCount))) { // When locks are released, compaction is commit-ready. All pages in the compaction // zone are accounted for, but the reserve list's queue nodes might be in the valid // zone. Most pages will simply be discarded. mTotalPageCount = mCompactionTargetPageCount; upperBound = mTotalPageCount - 1; } mCompacting = false; mCompactionTargetPageCount = Long.MAX_VALUE; // Set the reclamation upper bound with full lock held to prevent allocPage from // stealing from the reserves. They're now off limits. mReclaimUpperBound = upperBound; fullUnlock(); commitLock.releaseExclusive(); return ready; }
/** * @return false if aborted */ public boolean compactionEnd(CommitLock commitLock) throws IOException { // Default will reclaim everything. long upperBound = Long.MAX_VALUE; boolean ready = compactionVerify(); // Need exclusive commit lock to prevent delete and recycle from attempting to operate // against a null reserve list. A race condition exists otherwise. Acquire full lock // too out of paranoia. commitLock.acquireExclusive(); fullLock(); if (ready && (ready = mCompacting && (mTotalPageCount > mCompactionTargetPageCount || mPageArray.getPageCount() > mTotalPageCount))) { // When locks are released, compaction is commit-ready. All pages in the compaction // zone are accounted for, but the reserve list's queue nodes might be in the valid // zone. Most pages will simply be discarded. mTotalPageCount = mCompactionTargetPageCount; upperBound = mTotalPageCount - 1; } mCompacting = false; mCompactionTargetPageCount = Long.MAX_VALUE; // Set the reclamation upper bound with full lock held to prevent allocPage from // stealing from the reserves. They're now off limits. mReclaimUpperBound = upperBound; fullUnlock(); commitLock.releaseExclusive(); return ready; }
/** * @return false if aborted */ public boolean compactionEnd(CommitLock commitLock) throws IOException { // Default will reclaim everything. long upperBound = Long.MAX_VALUE; boolean ready = compactionVerify(); // Need exclusive commit lock to prevent delete and recycle from attempting to operate // against a null reserve list. A race condition exists otherwise. Acquire full lock // too out of paranoia. commitLock.acquireExclusive(); fullLock(); if (ready && (ready = mCompacting && (mTotalPageCount > mCompactionTargetPageCount || mPageArray.getPageCount() > mTotalPageCount))) { // When locks are released, compaction is commit-ready. All pages in the compaction // zone are accounted for, but the reserve list's queue nodes might be in the valid // zone. Most pages will simply be discarded. mTotalPageCount = mCompactionTargetPageCount; upperBound = mTotalPageCount - 1; } mCompacting = false; mCompactionTargetPageCount = Long.MAX_VALUE; // Set the reclamation upper bound with full lock held to prevent allocPage from // stealing from the reserves. They're now off limits. mReclaimUpperBound = upperBound; fullUnlock(); commitLock.releaseExclusive(); return ready; }
/** * @return false if aborted */ public boolean compactionEnd(CommitLock commitLock) throws IOException { // Default will reclaim everything. long upperBound = Long.MAX_VALUE; boolean ready = compactionVerify(); // Need exclusive commit lock to prevent delete and recycle from attempting to operate // against a null reserve list. A race condition exists otherwise. Acquire full lock // too out of paranoia. commitLock.acquireExclusive(); fullLock(); if (ready && (ready = mCompacting && (mTotalPageCount > mCompactionTargetPageCount || mPageArray.getPageCount() > mTotalPageCount))) { // When locks are released, compaction is commit-ready. All pages in the compaction // zone are accounted for, but the reserve list's queue nodes might be in the valid // zone. Most pages will simply be discarded. mTotalPageCount = mCompactionTargetPageCount; upperBound = mTotalPageCount - 1; } mCompacting = false; mCompactionTargetPageCount = Long.MAX_VALUE; // Set the reclamation upper bound with full lock held to prevent allocPage from // stealing from the reserves. They're now off limits. mReclaimUpperBound = upperBound; fullUnlock(); commitLock.releaseExclusive(); return ready; }
/** * @return false if aborted */ public boolean compactionEnd(CommitLock commitLock) throws IOException { // Default will reclaim everything. long upperBound = Long.MAX_VALUE; boolean ready = compactionVerify(); // Need exclusive commit lock to prevent delete and recycle from attempting to operate // against a null reserve list. A race condition exists otherwise. Acquire full lock // too out of paranoia. commitLock.acquireExclusive(); fullLock(); if (ready && (ready = mCompacting && (mTotalPageCount > mCompactionTargetPageCount || mPageArray.getPageCount() > mTotalPageCount))) { // When locks are released, compaction is commit-ready. All pages in the compaction // zone are accounted for, but the reserve list's queue nodes might be in the valid // zone. Most pages will simply be discarded. mTotalPageCount = mCompactionTargetPageCount; upperBound = mTotalPageCount - 1; } mCompacting = false; mCompactionTargetPageCount = Long.MAX_VALUE; // Set the reclamation upper bound with full lock held to prevent allocPage from // stealing from the reserves. They're now off limits. mReclaimUpperBound = upperBound; fullUnlock(); commitLock.releaseExclusive(); return ready; }
/** * @return false if aborted */ public boolean compactionEnd(CommitLock commitLock) throws IOException { // Default will reclaim everything. long upperBound = Long.MAX_VALUE; boolean ready = compactionVerify(); // Need exclusive commit lock to prevent delete and recycle from attempting to operate // against a null reserve list. A race condition exists otherwise. Acquire full lock // too out of paranoia. commitLock.acquireExclusive(); fullLock(); if (ready && (ready = mCompacting && (mTotalPageCount > mCompactionTargetPageCount || mPageArray.getPageCount() > mTotalPageCount))) { // When locks are released, compaction is commit-ready. All pages in the compaction // zone are accounted for, but the reserve list's queue nodes might be in the valid // zone. Most pages will simply be discarded. mTotalPageCount = mCompactionTargetPageCount; upperBound = mTotalPageCount - 1; } mCompacting = false; mCompactionTargetPageCount = Long.MAX_VALUE; // Set the reclamation upper bound with full lock held to prevent allocPage from // stealing from the reserves. They're now off limits. mReclaimUpperBound = upperBound; fullUnlock(); commitLock.releaseExclusive(); return ready; }
mDatabase.commitLock().acquireExclusive(); try { root.acquireExclusive();
mDatabase.commitLock().acquireExclusive(); try { root.acquireExclusive();
mDatabase.commitLock().acquireExclusive(); try { root.acquireExclusive();
mDatabase.commitLock().acquireExclusive(); try { root.acquireExclusive();
mDatabase.commitLock().acquireExclusive(); try { root.acquireExclusive();
mDatabase.commitLock().acquireExclusive(); try { root.acquireExclusive();
mCommitLock.acquireExclusive(); try { commit(false, header, null);
mCommitLock.acquireExclusive(); try { commit(false, header, null);