feat: restore one session variable with RESET <name> - #978
Conversation
Add RESET <name> on the existing prepareReset/commitPersistentReset startup-snapshot path so a successful reset retires only that variable's LOCAL undo. RESET LOCAL and SET x=DEFAULT stay out of scope. Fixes #960 Co-authored-by: apstndb <apstndb@users.noreply.github.com>
Code Metrics Report📊 View detailed coverage report (available for 7 days)
Details | | main (6b9600a) | #978 (96bc201) | +/- |
|---------------------|----------------|----------------|-------|
+ | Coverage | 86.5% | 86.5% | +0.0% |
| Files | 113 | 113 | 0 |
| Lines | 10678 | 10690 | +12 |
+ | Covered | 9242 | 9255 | +13 |
+ | Code to Test Ratio | 1:2.2 | 1:2.3 | +0.0 |
| Code | 23860 | 23897 | +37 |
+ | Test | 54538 | 54985 | +447 |
+ | Test Execution Time | 1m42s | 1m24s | -18s |Code coverage of files in pull request scope (90.0% → 90.2%, patch 83.3%)
Reported by octocov |
|
Independent coordinator confirmation on exact HEAD SQL {"repo":"apstndb/spanner-mycli","pr":978,"head":"7afe8fcd272c21732307af8fb11d39d541922d80","base":"83ae3abccc3105687d34931727e1db694bb34950","validation":["hosted test/lint/race/readme-sync/govulncheck/cross-compile success on exact HEAD","worker local make check exit 0","worker ./internal/mycli coverage 82.4%","MERGEABLE CLEAN","no unresolved review threads"],"deviations":["KEEP_TRANSACTION_ALIVE RESET cases skipped; that var is not on this main pending #977"],"blockers":[]} |
|
Withdrawing the ready JSON for |
Add statement and registry RESET cases for the keepalive session variable now on main, including --set startup restore and isolation from unrelated LOCAL undo. Co-authored-by: apstndb <apstndb@users.noreply.github.com>
|
Additive merge of Current HEAD:
|
|
Independent coordinator confirmation on exact HEAD Additive merge of origin/main plus KEEP_TRANSACTION_ALIVE RESET cases. Worker reports {"repo":"apstndb/spanner-mycli","pr":978,"head":"77fb7a3f14c8b145f8680939eaa62659b79aa6bf","base":"6b9600acf40d1eb8b18eeab845b3141dc68a9305","validation":["hosted test/lint/race/readme-sync/govulncheck/cross-compile success on exact HEAD","worker local make check exit 0","MERGEABLE CLEAN","no unresolved review threads"],"deviations":[],"blockers":[]} |
|
Independent review of exact HEAD The statement reuses startup capture, reset preparation/commit and targeted LOCAL undo retirement. I reviewed canonical/alias handling, exclusions and guards, unchanged-value behavior, detached execution, help/completion, and TRANSACTION_TAG's writable-slot semantics. Independent focused tests and full Docker |
Co-authored-by: apstndb <apstndb@users.noreply.github.com>
#978 added RESET <name>. Drive the automatic DML policy freeze scenario through that statement instead of the registry API. Co-authored-by: apstndb <apstndb@users.noreply.github.com>
Summary
Adds
RESET <name>as the single-variable companion toRESET ALL(#484 / #976).Fixes #960.
Behavior
prepareReset, andcommitPersistentResetpath. The SQL statement does not call the low-levelReset(name)wrapper, which does not retire SET LOCAL undo.--setoverrides. Init-command assignments remain resettable.TRANSACTION_TAGcontinues to compare and restore the writable next-owner slot (ResetSnapshot), not SHOW.RESET LOCALandSET x=DEFAULTare not implemented.Docs
--statement-help, README, anddocs/system_variables.mdRESET <single property>implemented (Support RESET of a single session variable using startup values #960); removed the old no-issue candidate entryValidation
--setstartup, DDL vars, and TRANSACTION_TAG slot semanticsmake checkexit 0 (log:.tmp/driver-parity-960/make-check.log)./internal/myclishort coverage 82.4% (floor 80%)make check-racenot run: no transaction concurrency or lifecycle changes