Repository navigation
test(memory): pin that a closed tab lets go of its rows and its result - #4598
Merged
Merged
Conversation
A closed result's footprint stayed high after the close. This pins the half of the question code can answer: after closeTabsByUser nothing keeps the tab's ResultSet or its row buffer alive, whether it was the last tab or one of two.
datlechin
enabled auto-merge (squash)
November 26, 2026 01:52
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.
Summary
ClosedTabReleaseTests(new) runs a query through the real run path (runQueryon a coordinator with a stub driver returning 2,000 rows), builds the tab's grid model, closes the tab withcloseTabsByUser, then checks that nothing holds what the result held: the tab'sResultSet, through a weak reference, and its row buffer, through a copy ofContiguousArray<Row>whose storage must be uniquely held after the close. Two cases: the last tab, and one of two.switchDatabase(to:). The run path pins a MySQL tab to its database before it runs, and the PluginKit default throws "This driver does not support database switching", so no row ever arrived. That was the macOS Tests failure on CI.malloc_zone_pressure_reliefreading stay on perf(memory): find why footprint stays high after a large result is closed #4557: they need the real app against a live server.Test plan
verify.sh test ClosedTabReleaseTests: PASS, 2 executed, 2 passed.verify.sh build: PASS.verify.sh linton the test file: PASS.Closes #4557