Skip to content

Commit

Permalink
ignite-2.4.1-merge-master Fixing checkpoint lock acquisition
Browse files Browse the repository at this point in the history
  • Loading branch information
agoncharuk committed Dec 18, 2017
1 parent 66bca4d commit 144c666
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -826,6 +826,8 @@ public String toString() {
}

if (e != null) {
ctx.shared().database().checkpointReadLock();

try {
cacheVal = e.peek(modes.heap, modes.offheap, topVer, plc);
}
Expand All @@ -837,6 +839,8 @@ public String toString() {
}
finally {
ctx0.evicts().touch(e, null);

ctx.shared().database().checkpointReadUnlock();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,8 @@ private void loadEntry(KeyCacheObject key,
if (part.reserve()) {
GridCacheEntryEx entry = null;

ctx.shared().database().checkpointReadLock();

try {
long ttl = CU.ttlForLoad(plc);

Expand Down Expand Up @@ -678,6 +680,8 @@ private void loadEntry(KeyCacheObject key,
entry.context().evicts().touch(entry, topVer);

part.release();

ctx.shared().database().checkpointReadUnlock();
}
}
else if (log.isDebugEnabled())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,8 @@ private void onEntriesLocked() {

ExpiryPolicy expiry = cacheCtx.expiryForTxEntry(txEntry);

cctx.database().checkpointReadLock();

try {
if ((txEntry.op() == CREATE || txEntry.op() == UPDATE) &&
txEntry.conflictExpireTime() == CU.EXPIRE_TIME_CALCULATE) {
Expand Down Expand Up @@ -509,6 +511,9 @@ else if (retVal)
catch (GridCacheEntryRemovedException e) {
assert false : "Got entry removed exception while holding transactional lock on entry [e=" + e + ", cached=" + cached + ']';
}
finally {
cctx.database().checkpointReadUnlock();
}
}
}

Expand Down

0 comments on commit 144c666

Please sign in to comment.