Skip to content

Commit

Permalink
FiFixed bug CORE-3465 : Nbackup state lock could be not released afte…
Browse files Browse the repository at this point in the history
…r 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 5, 2011
1 parent dc30e39 commit 5bbff34
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/jrd/cch.cpp
Expand Up @@ -2235,6 +2235,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 @@ -2244,6 +2246,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 5bbff34

Please sign in to comment.