Skip to content

Commit

Permalink
Backported fix for bug CORE-3465 : Nbackup state lock could be not re…
Browse files Browse the repository at this point in the history
…leased after cache error. It results in "Can't lock state for write" bugcheck when backup state is going to be changed.
  • Loading branch information
hvlad committed May 10, 2011
1 parent bcff882 commit 16e64b5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/jrd/cch.cpp
Expand Up @@ -2426,6 +2426,8 @@ void CCH_unwind(thread_db* tdbb, const bool punt)
if (bdb->bdb_flags & BDB_marked) {
BUGCHECK(268); // msg 268 buffer marked during cache unwind
}
tdbb->getAttachment()->backupStateReadUnLock(tdbb);

bdb->bdb_flags &= ~(BDB_writer | BDB_faked | BDB_must_write);
release_bdb(tdbb, bdb, true, false, false);
}
Expand All @@ -2435,6 +2437,8 @@ void CCH_unwind(thread_db* tdbb, const bool punt)
SharedLatch* latch = findSharedLatch(tdbb, bdb);
while (latch)
{
tdbb->getAttachment()->backupStateReadUnLock(tdbb);

release_bdb(tdbb, bdb, true, false, false);
latch = findSharedLatch(tdbb, bdb);
}
Expand Down

0 comments on commit 16e64b5

Please sign in to comment.