Repository navigation
support restore publication db - #16448
Conversation
PR Review 🔍
|
PR Code Suggestions ✨
|
support restore publication db ___ ### **PR Type** Feature, Tests ___ ### **Description** - Added support for deleting publication from the database. - Added shared transaction background execution function. - Added functions to handle publication database operations during snapshot restoration. - Added test cases and SQL scripts for restoring publication database from snapshot. ___ ### **Changes walkthrough** 📝 <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement </strong></td><td><table> <tr> <td> <details> <summary><strong>authenticate.go</strong><dd><code>Add support for deleting publication from database and shared </code><br><code>transaction execution.</code></dd></summary> <hr> pkg/frontend/authenticate.go <li>Added SQL format for deleting publication from database.<br> <li> Added function to get SQL for deleting publication from database.<br> <li> Modified <code>isDbPublishing</code> to use shared transaction background <br>execution.<br> </details> </td> <td><a href="https://github.com/matrixorigin/matrixone/pull/16448/files#diff-849f201c351210bd95807e99d1538e2602a5244b256c35e58467afe304c509e6">+11/-8</a> </td> </tr> <tr> <td> <details> <summary><strong>back_exec.go</strong><dd><code>Add shared transaction background execution function.</code> </dd></summary> <hr> pkg/frontend/back_exec.go - Added function to get shared transaction background execution. </details> </td> <td><a href="https://github.com/matrixorigin/matrixone/pull/16448/files#diff-6c8c7605ddaba02dbfd483c021e3901f66c8205e467634fde29e0dbdbb79396a">+40/-0</a> </td> </tr> <tr> <td> <details> <summary><strong>snapshot.go</strong><dd><code>Add support for publication database operations in snapshot </code><br><code>restoration.</code></dd></summary> <hr> pkg/frontend/snapshot.go <li>Added constants and SQL formats for publication database operations.<br> <li> Added functions to get SQL for publication count with snapshot and <br>restore publication record.<br> <li> Added functions to check and drop publication record, and to check and <br>restore publication record.<br> </details> </td> <td><a href="https://github.com/matrixorigin/matrixone/pull/16448/files#diff-2774e67c5debc02b9642113381977ab7c4c591114aabe013627c63851d0c2f9c">+129/-0</a> </td> </tr> <tr> <td> <details> <summary><strong>types.go</strong><dd><code>Add shared transaction background execution method to FeSession </code><br><code>interface.</code></dd></summary> <hr> pkg/frontend/types.go - Added `GetShareTxnBackgroundExec` method to `FeSession` interface. </details> </td> <td><a href="https://github.com/matrixorigin/matrixone/pull/16448/files#diff-5426ed8bd66760011299bcef0a9d1d552477eaae49a8451e16b8ec5bf7d7310f">+1/-0</a> </td> </tr> </table></td></tr><tr><td><strong>Tests </strong></td><td><table> <tr> <td> <details> <summary><strong>snapshot_restore_publication.result</strong><dd><code>Add test cases for restoring publication database from snapshot.</code></dd></summary> <hr> test/distributed/cases/snapshot/snapshot_restore_publication.result - Added test cases for restoring publication database from snapshot. </details> </td> <td><a href="https://github.com/matrixorigin/matrixone/pull/16448/files#diff-cd27b7e6665f58d3df027239321cc738648d682e32282cdba3bc4623a1f6339e">+446/-0</a> </td> </tr> <tr> <td> <details> <summary><strong>snapshot_restore_publication.sql</strong><dd><code>Add SQL scripts for testing publication database restoration from </code><br><code>snapshot.</code></dd></summary> <hr> test/distributed/cases/snapshot/snapshot_restore_publication.sql <li>Added SQL scripts for testing publication database restoration from <br>snapshot.<br> </details> </td> <td><a href="https://github.com/matrixorigin/matrixone/pull/16448/files#diff-628fac0767093e07f75ae64707642fb96eb836b169c4d011013cfda409934fa3">+402/-0</a> </td> </tr> </table></td></tr></tr></tbody></table> ___ > 💡 **PR-Agent usage**: >Comment `/help` on the PR to get a list of all available PR-Agent tools and their descriptions Approved by: @daviszhen, @aressu1985
support restore publication db ___ ### **PR Type** Feature, Tests ___ ### **Description** - Added support for deleting publication from the database. - Added shared transaction background execution function. - Added functions to handle publication database operations during snapshot restoration. - Added test cases and SQL scripts for restoring publication database from snapshot. ___ ### **Changes walkthrough** 📝 <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement </strong></td><td><table> <tr> <td> <details> <summary><strong>authenticate.go</strong><dd><code>Add support for deleting publication from database and shared </code><br><code>transaction execution.</code></dd></summary> <hr> pkg/frontend/authenticate.go <li>Added SQL format for deleting publication from database.<br> <li> Added function to get SQL for deleting publication from database.<br> <li> Modified <code>isDbPublishing</code> to use shared transaction background <br>execution.<br> </details> </td> <td><a href="https://github.com/matrixorigin/matrixone/pull/16448/files#diff-849f201c351210bd95807e99d1538e2602a5244b256c35e58467afe304c509e6">+11/-8</a> </td> </tr> <tr> <td> <details> <summary><strong>back_exec.go</strong><dd><code>Add shared transaction background execution function.</code> </dd></summary> <hr> pkg/frontend/back_exec.go - Added function to get shared transaction background execution. </details> </td> <td><a href="https://github.com/matrixorigin/matrixone/pull/16448/files#diff-6c8c7605ddaba02dbfd483c021e3901f66c8205e467634fde29e0dbdbb79396a">+40/-0</a> </td> </tr> <tr> <td> <details> <summary><strong>snapshot.go</strong><dd><code>Add support for publication database operations in snapshot </code><br><code>restoration.</code></dd></summary> <hr> pkg/frontend/snapshot.go <li>Added constants and SQL formats for publication database operations.<br> <li> Added functions to get SQL for publication count with snapshot and <br>restore publication record.<br> <li> Added functions to check and drop publication record, and to check and <br>restore publication record.<br> </details> </td> <td><a href="https://github.com/matrixorigin/matrixone/pull/16448/files#diff-2774e67c5debc02b9642113381977ab7c4c591114aabe013627c63851d0c2f9c">+129/-0</a> </td> </tr> <tr> <td> <details> <summary><strong>types.go</strong><dd><code>Add shared transaction background execution method to FeSession </code><br><code>interface.</code></dd></summary> <hr> pkg/frontend/types.go - Added `GetShareTxnBackgroundExec` method to `FeSession` interface. </details> </td> <td><a href="https://github.com/matrixorigin/matrixone/pull/16448/files#diff-5426ed8bd66760011299bcef0a9d1d552477eaae49a8451e16b8ec5bf7d7310f">+1/-0</a> </td> </tr> </table></td></tr><tr><td><strong>Tests </strong></td><td><table> <tr> <td> <details> <summary><strong>snapshot_restore_publication.result</strong><dd><code>Add test cases for restoring publication database from snapshot.</code></dd></summary> <hr> test/distributed/cases/snapshot/snapshot_restore_publication.result - Added test cases for restoring publication database from snapshot. </details> </td> <td><a href="https://github.com/matrixorigin/matrixone/pull/16448/files#diff-cd27b7e6665f58d3df027239321cc738648d682e32282cdba3bc4623a1f6339e">+446/-0</a> </td> </tr> <tr> <td> <details> <summary><strong>snapshot_restore_publication.sql</strong><dd><code>Add SQL scripts for testing publication database restoration from </code><br><code>snapshot.</code></dd></summary> <hr> test/distributed/cases/snapshot/snapshot_restore_publication.sql <li>Added SQL scripts for testing publication database restoration from <br>snapshot.<br> </details> </td> <td><a href="https://github.com/matrixorigin/matrixone/pull/16448/files#diff-628fac0767093e07f75ae64707642fb96eb836b169c4d011013cfda409934fa3">+402/-0</a> </td> </tr> </table></td></tr></tr></tbody></table> ___ > 💡 **PR-Agent usage**: >Comment `/help` on the PR to get a list of all available PR-Agent tools and their descriptions Approved by: @daviszhen, @aressu1985
User description
What type of PR is this?
Which issue(s) this PR fixes:
issue #16353
What this PR does / why we need it:
support restore publication db
PR Type
Feature, Tests
Description
Changes walkthrough 📝
authenticate.go
Add support for deleting publication from database and sharedtransaction execution.pkg/frontend/authenticate.go
isDbPublishingto use shared transaction backgroundexecution.
back_exec.go
Add shared transaction background execution function.pkg/frontend/back_exec.go
snapshot.go
Add support for publication database operations in snapshotrestoration.pkg/frontend/snapshot.go
restore publication record.
restore publication record.
types.go
Add shared transaction background execution method to FeSessioninterface.pkg/frontend/types.go
GetShareTxnBackgroundExecmethod toFeSessioninterface.snapshot_restore_publication.result
Add test cases for restoring publication database from snapshot.test/distributed/cases/snapshot/snapshot_restore_publication.result
snapshot_restore_publication.sql
Add SQL scripts for testing publication database restoration fromsnapshot.test/distributed/cases/snapshot/snapshot_restore_publication.sql
snapshot.