Add manual delete for tra_dbcreators_list#8207
Merged
AlexPeshkoff merged 2 commits intoFirebirdSQL:masterfrom Aug 6, 2024
Merged
Add manual delete for tra_dbcreators_list#8207AlexPeshkoff merged 2 commits intoFirebirdSQL:masterfrom
AlexPeshkoff merged 2 commits intoFirebirdSQL:masterfrom
Conversation
If we don't delete it manually assert will be thrown if SEC$DB_CREATORS returns a lot of records
Contributor
Author
|
Maybe it would be better to wrap |
AlexPeshkoff
approved these changes
Aug 6, 2024
Member
AlexPeshkoff
left a comment
There was a problem hiding this comment.
Please also backport this fix to old branches
Member
|
I will backport it. |
dyemanov
reviewed
Aug 6, 2024
| tra_user_management(NULL), | ||
| tra_sec_db_context(NULL), | ||
| tra_mapping_list(NULL), | ||
| tra_dbcreators_list(nullptr), |
Member
There was a problem hiding this comment.
This is not required as every class inherited from pool_alloc has its instance zero-initialized at creation. But I prefer us being more explicit in this regard, so this is a good thing for master.
dyemanov
pushed a commit
that referenced
this pull request
Aug 6, 2024
* Delete tra_dbcreators_list in ~jrd_tra If we don't delete it manually assert will be thrown if SEC$DB_CREATORS returns a lot of records * Add missing default initialization for tra_dbcreators_list --------- Co-authored-by: Artyom Ivanov <[email protected]>
dyemanov
pushed a commit
that referenced
this pull request
Nov 16, 2024
* Delete tra_dbcreators_list in ~jrd_tra If we don't delete it manually assert will be thrown if SEC$DB_CREATORS returns a lot of records * Add missing default initialization for tra_dbcreators_list --------- Co-authored-by: Artyom Ivanov <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I found that if we try to write a lot of records to
RecordBuffer(>MIN_TEMP_BLOCK_SIZE) we start increasingm_tempCacheUsage. When we don't needRecordBufferanymore, it will be destroyed in~SnapshotData(), which will call~TempSpace()forFirebird::AutoPtr<TempSpace> space, and in~TempSpace()we will decreasem_tempCacheUsage.But this doesn't apply to
tra_dbcreators_listbecause we delete it by dropping the transaction pool, so destructor doesn't kick in and we don't decreasem_tempCacheUsage. All of this will causefb_assert(m_tempCacheUsage == 0)to be thrown, but I don't know what this might lead to in release build (nothing good, I suppose).This is also true for Firebird 5.0.