-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New yb-admin command to set the wal retention time of a table #1931
Comments
Summary: This diff provides a way to specify the minimum WAL retention time. A new field wal_retention_secs has been added to AlterTableRequestPB to use the AlterTable mechanism to modify a table's retention time. By doing this, we get the same guarantees that we get when we do other types of modification like table rename, or change of schema. Once a tablet server receives a request to modify the WAL retention time, it will be saved in its RaftGroupReplicaSuperBlockPB so that it can be remembered in case of restart. We will provide a yb-admin command in a different diff to set the wal retention time of a table: #1931 Test Plan: New unit test Reviewers: rahuldesirazu, neha, bogdan Reviewed By: bogdan Subscribers: bogdan Differential Revision: https://phabricator.dev.yugabyte.com/D6672
The CLI command for this operation was never written. There is a user-facing API to change wal retention through |
Requested by Support https://yugabyte.slack.com/archives/C4K1838GL/p1634659938118200 |
|
Per discussion with Nicolas, this is a user interface to update the WAL retention time and collect the following information.
Reference discussion in slack: https://yugabyte.slack.com/archives/C027M2T0W8Z/p1641254306045600 |
Summary: For supporting xCluster project, per request, we would like to be able to set the WAL retention time for a table. The backend API has been implemented. This diff only add the user interface in yb-admin. Also, re-organized a few header dependencies of using classes under enterprise. Before the change, they had an implicit dependency and clangd cannot resolve them properly. In a more general user interface, we should consider adding such commands to YSQL and YCQL as well. However, due to the log concept gaps and ambiguity for the use cases at this point, we implement it in yb-admin first for the short-term needs of the xCluster project. These implementations are orthogonal. This is not wasted work if we later decided to add them to our QL interfaces. Test Plan: Manually run: ```./build/latest/bin/yb-admin set_wal_retention_secs ysql.yugabyte films3 999 Set table films WAL retention time to 999 seconds. ``` Observed ` log.cc:1052] T f85a9e457146442dbdcf772d86cfa663 P afa6631489ed44e48e44fa395835ddd7: Setting log wal retention time to 999 seconds ` in logs. `./build/latest/bin/yb-admin set_wal_retention_secs ysql.yugabyte films3 2147483647` succeeded with max 31bit input. ``` ./build/latest/bin/yb-admin set_wal_retention_secs ysql.yugabyte films3 2147483648 Error running set_wal_retention_sec: Invalid argument (yb/tools/yb-admin_client.cc:369): Namespace '2147483648' of type 'ycql' not found ``` failed. This looks like we have a day 1 bug in processing input larger than max 31bit integer. When that input is large (>31 bit int), the command doesn't recognize them correctly. This should be fixed (at least throw meaningful error message) in a separate diff. Reviewers: smishra, nicolas Reviewed By: nicolas Subscribers: bogdan, ybase, yql Differential Revision: https://phabricator.dev.yugabyte.com/D14909
Close this issue as Item 1 is finished. For items 2 and 3, this is a long-term discussion and we don't have a clear vision so far. Moved the long-term discussion to #11735 for separate tracking. |
We need a way to manually set the wal retention time of a specific table through yb-admin
The text was updated successfully, but these errors were encountered: