Skip to content
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

Add run interval support for table ttl settings #135

Open
pnv1 opened this issue Jul 19, 2023 · 4 comments
Open

Add run interval support for table ttl settings #135

pnv1 opened this issue Jul 19, 2023 · 4 comments
Labels
easy enhancement New feature or request good first issue Good for newcomers

Comments

@pnv1
Copy link
Collaborator

pnv1 commented Jul 19, 2023

https://github.com/ydb-platform/ydb/blob/main/ydb/public/api/protos/ydb_table.proto#L391

@pnv1 pnv1 added enhancement New feature or request good first issue Good for newcomers easy labels Jul 19, 2023
@Hmd02
Copy link

Hmd02 commented Jul 19, 2023

Hi,I want to contribute to this issue.Can you just guide me through it?I do not have much experience with it but I am willing to learn and contribute:smile:.

@alex268
Copy link
Member

alex268 commented Jul 20, 2023

You are welcome!)
For beginning, you can took at repository java-genproto, it contains java classes generated from proto specs. You can just update usage of TtlSettings in classes CreateTableSettings, AlterTableSettings and TableDescription

@Hmd02
Copy link

Hmd02 commented Jul 21, 2023

Hi,I read the proto specs and CreateTableSettings,AlterTableSetting.But I didn't understand how exactly are these classes using TtlSettings because it just returns ttlSetting object without performing any action/modifications.Then I looked up in BaseSession class where objects of CreateTableSettings, AlterTableSettings class set the expirySeconds and ColumnName for object of YdbTable.DateTypeColumnModeSettings.Builder class generated by proto.Can you help me understand how exactly do I need to update CreateTableSettings, AlterTableSettings ,what role do these classes play,and where does run_interval come into play.Thanks!!

@alex268
Copy link
Member

alex268 commented Jul 24, 2023

Classes CreateTableSettings and AlterTableSettings are helpers for proto classes in YdbTable. Because direct usage of YdbTable is very unusual we made helpers for every proto message. Current implementation of TtlSettings and BaseSession supports only DataTypeColumnModeSettings and doesn't support ValueSinceUnixEpochModeSettings and run_interval_seconds. You can see it in this code which constructs CreateTableRequest message.
For resolving this issue we have to add new field to class TtlSettings and also add correct constructing of CreateTableRequest and AlterTableRequest in BaseSession's methods createTable and alterTable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants