Skip to content

go,integration-tests/{bats,go-sql-server-driver}: Implement GC sesssion lifecycle validation at the storage layer. Enable checks for bats and go sql server integration tests.#9050

Merged
reltuk merged 4 commits intomainfrom
aaron/nbs-validate-gc-session-state
Mar 31, 2025

Conversation

@reltuk
Copy link
Copy Markdown
Contributor

@reltuk reltuk commented Mar 29, 2025

This makes *NomsBlockStore check the incoming Context object to ensure that it itself has been invovled in the appropriate GC lifecycle callbacks.

It fixes a problem with statspro.AnalyzeTable, where the GC lifecycle callbacks happened more than once for a single session.

It fixes some callsites to appropriately make the GC lifecycle callbacks, including LateBindingQueryist opening one session command for the whole lifetime of the returned sql.Context.

…on lifecycle validation at the storage layer. Enable checks for bats and go sql server integration tests.

This makes *NomsBlockStore check the incoming Context object to ensure that it
itself has been invovled in the appropriate GC lifecycle callbacks.

It fixes a problem with statspro.AnalyzeTable, where the GC lifecycle callbacks
happened more than once for a single session.

It fixes some callsites to appropriately make the GC lifecycle callbacks,
including LateBindingQueryist opening one session command for the whole
lifetime of the returned sql.Context.
@reltuk reltuk requested a review from max-hoffman March 29, 2025 01:07
Copy link
Copy Markdown
Contributor

@max-hoffman max-hoffman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, tricky edge case


sqlCtx, err := se.NewDefaultContext(ctx)
if err != nil {
return nil, nil, nil, err
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this one need se.Close()? should we defer check if err != nil for closing every error retur?

@coffeegoddd
Copy link
Copy Markdown
Contributor

@reltuk DOLT

comparing_percentages
100.000000 to 100.000000
version result total
5ebc57e ok 5937457
version total_tests
5ebc57e 5937457
correctness_percentage
100.0

reltuk and others added 2 commits March 30, 2025 11:48
@coffeegoddd
Copy link
Copy Markdown
Contributor

@reltuk DOLT

comparing_percentages
100.000000 to 100.000000
version result total
ac439ac ok 5937457
version total_tests
ac439ac 5937457
correctness_percentage
100.0

@coffeegoddd
Copy link
Copy Markdown
Contributor

@coffeegoddd DOLT

comparing_percentages
100.000000 to 100.000000
version result total
519cf99 ok 5937457
version total_tests
519cf99 5937457
correctness_percentage
100.0

@coffeegoddd
Copy link
Copy Markdown
Contributor

@reltuk DOLT

comparing_percentages
100.000000 to 100.000000
version result total
08b754b ok 5937457
version total_tests
08b754b 5937457
correctness_percentage
100.0

@reltuk reltuk merged commit bbb25dc into main Mar 31, 2025
20 of 21 checks passed
@tbantle22 tbantle22 deleted the aaron/nbs-validate-gc-session-state branch May 28, 2025 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants