mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-27 18:03:04 +01:00
Restored assign attachment id in tip_cache for read only DB. Otherwise we have deadlock between GC thread and main attach thread.
This commit is contained in:
parent
7888507d7d
commit
5a6cbc2dc2
@ -65,15 +65,15 @@ namespace Jrd
|
||||
return dbb_tip_cache->generateTransactionId();
|
||||
}
|
||||
|
||||
/*void Database::assignLatestTransactionId(TraNumber number) {
|
||||
fb_assert(dbb_tip_cache);
|
||||
dbb_tip_cache->assignLatestTransactionId(number);
|
||||
}
|
||||
// void Database::assignLatestTransactionId(TraNumber number) {
|
||||
// fb_assert(dbb_tip_cache);
|
||||
// dbb_tip_cache->assignLatestTransactionId(number);
|
||||
// }
|
||||
|
||||
void Database::assignLatestAttachmentId(SLONG number) {
|
||||
fb_assert(dbb_tip_cache);
|
||||
dbb_tip_cache->assignLatestAttachmentId(number);
|
||||
}*/
|
||||
if (dbb_tip_cache)
|
||||
dbb_tip_cache->assignLatestAttachmentId(number);
|
||||
}
|
||||
|
||||
SLONG Database::generateStatementId() {
|
||||
if (!dbb_tip_cache) return 0;
|
||||
|
@ -492,8 +492,8 @@ public:
|
||||
SLONG generateAttachmentId();
|
||||
TraNumber generateTransactionId();
|
||||
SLONG generateStatementId();
|
||||
/*void assignLatestTransactionId(TraNumber number);
|
||||
void assignLatestAttachmentId(SLONG number);*/
|
||||
// void assignLatestTransactionId(TraNumber number);
|
||||
void assignLatestAttachmentId(SLONG number);
|
||||
|
||||
|
||||
USHORT getMaxIndexKeyLength() const
|
||||
|
@ -869,7 +869,7 @@ SLONG PAG_attachment_id(thread_db* tdbb)
|
||||
header_page* header = (header_page*) CCH_FETCH(tdbb, &window, LCK_write, pag_header);
|
||||
CCH_MARK(tdbb, &window);
|
||||
attachment->att_attachment_id = ++header->hdr_attachment_id;
|
||||
//dbb->assignLatestAttachmentId(attachment->att_attachment_id);
|
||||
dbb->assignLatestAttachmentId(attachment->att_attachment_id);
|
||||
|
||||
CCH_RELEASE(tdbb, &window);
|
||||
}
|
||||
|
@ -852,15 +852,15 @@ SLONG TipCache::generateStatementId() {
|
||||
return statement_id;
|
||||
}
|
||||
|
||||
/*void TipCache::assignLatestTransactionId(TraNumber number) {
|
||||
// XXX: there is no paired acquire because value assigned here is not really used for now
|
||||
atomic_int_store_release(&m_tpcHeader->getHeader()->latest_transaction_id, number);
|
||||
}
|
||||
//void TipCache::assignLatestTransactionId(TraNumber number) {
|
||||
// // XXX: there is no paired acquire because value assigned here is not really used for now
|
||||
// atomic_int_store_release(&m_tpcHeader->getHeader()->latest_transaction_id, number);
|
||||
//}
|
||||
|
||||
void TipCache::assignLatestAttachmentId(SLONG number) {
|
||||
// XXX: there is no paired acquire because value assigned here is not really used for now
|
||||
atomic_int_store_release(&m_tpcHeader->getHeader()->latest_attachment_id, number);
|
||||
}*/
|
||||
}
|
||||
|
||||
int TPC_snapshot_state(thread_db* tdbb, TraNumber number)
|
||||
{
|
||||
|
@ -134,8 +134,8 @@ public:
|
||||
TraNumber generateTransactionId();
|
||||
SLONG generateAttachmentId();
|
||||
SLONG generateStatementId();
|
||||
/*void assignLatestTransactionId(TraNumber number);
|
||||
void assignLatestAttachmentId(SLONG number);*/
|
||||
//void assignLatestTransactionId(TraNumber number);
|
||||
void assignLatestAttachmentId(SLONG number);
|
||||
|
||||
private:
|
||||
class GlobalTpcHeader : public Firebird::MemoryHeader {
|
||||
|
Loading…
Reference in New Issue
Block a user