Repository navigation
Conversation
Girgias
approved these changes
Nov 9, 2026
Girgias
left a comment
Member
There was a problem hiding this comment.
Seems reasonable, just some nits.
dba_close() looked up the persistent entry with connection->info after dba_close_connection() had cleared it, so the entry was never removed and the database file and its lock stayed held. Count the connections on the entry's refcount again, as PHP 8.3 did, and close the handle when dba_close() releases the last one, unless another persistent handle to the same file shares its stream. Lock conflict checks now also see persistent handles still in use, since closing one of two connections with the same key removed the other's DBA_G(connections) entry.
iliaal
force-pushed
the
fix/aph-dba-close-persistent-5dhu-84
branch
from
November 10, 2026 00:10
ddb77d7 to
b425175
Compare
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.
After
dba_popen(),dba_close()left the file open and its lock held until shutdown, because it looked up the persistent entry after dba_close_connection() had already cleared connection->info. Count connections on the persistent resource's refcount again, as PHP 8.3 did, so the last dba_close() closes the handle. A handle sharing its stream with another persistent handle (modes rl and rd on one file) stays open, as before. Lock checks also see persistent handles still in use. Girgias pointed this out on #25155.