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

feat: show cluster versions for database objects #14167

Merged
merged 5 commits into from
Dec 29, 2023

Conversation

hzxa21
Copy link
Collaborator

@hzxa21 hzxa21 commented Dec 23, 2023

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

Fix #13614.

Store initialized_at_cluster_version and created_at_cluster_version in meta store and display them in rw system tables.

Limitation: the version is based on the meta node version. It may not accurately reflect the compute node version if we are using different codes for different roles, which is unlikely in most cases.

Documentation

  • My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note

If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

@hzxa21
Copy link
Collaborator Author

hzxa21 commented Dec 23, 2023

Example output (risedev d):

dev=> select * from rw_tables;
  id  | name | schema_id | owner |       definition       |                 acl                 |        initialized_at         |          created_at           |         initialized_at_cluster_version          |           created_at_cluster_version            
------+------+-----------+-------+------------------------+-------------------------------------+-------------------------------+-------------------------------+-------------------------------------------------+-------------------------------------------------
 1001 | a    |         0 |     1 | CREATE TABLE a (a INT) | {postgres=arwd/root,root=arwd/root} | 2023-12-23 05:16:34.069+00:00 | 2023-12-23 05:16:34.094+00:00 | PostgreSQL 9.5-RisingWave-1.5.0-alpha (unknown) | PostgreSQL 9.5-RisingWave-1.5.0-alpha (unknown)
(1 row)

unkown should be replaced by the git commit hash in release build.

Copy link
Member

@yezizp2012 yezizp2012 left a comment

Choose a reason for hiding this comment

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

Rest LGTM!

src/meta/model_v2/src/object.rs Show resolved Hide resolved
@hzxa21 hzxa21 force-pushed the patrick/catalog-record-cluster-version branch from fa0d2b4 to b4d82f2 Compare December 29, 2023 05:19
@hzxa21 hzxa21 added this pull request to the merge queue Dec 29, 2023
Merged via the queue into main with commit 9ec5812 Dec 29, 2023
28 of 29 checks passed
@hzxa21 hzxa21 deleted the patrick/catalog-record-cluster-version branch December 29, 2023 08:52
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.

Record the original system version + commit ID when users created database objects
2 participants