Skip to content

feat: add optional created_at and initialized_at for rw relations - #11199

Merged
shanicky merged 5 commits into
mainfrom
peng/created_at
Jul 25, 2023
Merged

shanicky merged 5 commits into
mainfrom
peng/created_at

Conversation

@shanicky

@shanicky shanicky commented Jul 25, 2023 •

Copy link
Copy Markdown
Contributor

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

What's changed and what's your intention?

dev=> select name,initialized_at,created_at from rw_sources;
 name |        initialized_at         |          created_at
------+-------------------------------+-------------------------------
 s    | 2023-07-25 10:53:30.128+00:00 | 2023-07-25 10:53:30.130+00:00
(1 row)

dev=> select name,initialized_at,created_at from rw_sinks;
 name |        initialized_at         |          created_at
------+-------------------------------+-------------------------------
 ss   | 2023-07-25 10:53:32.176+00:00 | 2023-07-25 10:53:43.238+00:00
(1 row)

dev=> select name,initialized_at,created_at from rw_tables;
 name |        initialized_at         |          created_at
------+-------------------------------+-------------------------------
 t    | 2023-07-25 10:53:28.030+00:00 | 2023-07-25 10:53:28.052+00:00
(1 row)

dev=> select name,initialized_at,created_at from rw_indexes;
 name |        initialized_at         |          created_at
------+-------------------------------+-------------------------------
 x    | 2023-07-25 10:53:30.135+00:00 | 2023-07-25 10:53:32.171+00:00
(1 row)

dev=> select name,initialized_at,created_at from rw_materialized_views;
 name |        initialized_at         |          created_at
------+-------------------------------+-------------------------------
 m    | 2023-07-25 10:53:28.089+00:00 | 2023-07-25 10:53:30.123+00:00
(1 row)

dev=> select relationname, relationtype , initialized_at, created_at from rw_relation_info ;
 relationname |   relationtype    |        initialized_at         |          created_at
--------------+-------------------+-------------------------------+-------------------------------
 m            | MATERIALIZED VIEW | 2023-07-25 10:53:28.089+00:00 | 2023-07-25 10:53:30.123+00:00
 t            | TABLE             | 2023-07-25 10:53:28.030+00:00 | 2023-07-25 10:53:28.052+00:00
 ss           | SINK              | 2023-07-25 10:53:32.176+00:00 | 2023-07-25 10:53:43.238+00:00
 x            | INDEX             | 2023-07-25 10:53:30.135+00:00 | 2023-07-25 10:53:32.171+00:00
 s            | SOURCE            | 2023-07-25 10:53:30.128+00:00 | 2023-07-25 10:53:30.130+00:00
(5 rows)

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • All checks passed in ./risedev check (or alias, ./risedev c)

Documentation

@github-actions github-actions Bot added the type/feature Type: New feature. label Jul 25, 2023
@shanicky
shanicky force-pushed the peng/created_at branch 3 times, most recently from d1d2523 to 038591a Compare July 25, 2023 08:49
@github-actions github-actions Bot added the user-facing-changes Contains changes that are visible to users label Jul 25, 2023
@shanicky
shanicky marked this pull request as ready for review July 25, 2023 09:40
@shanicky
shanicky requested a review from yezizp2012 July 25, 2023 09:41

@yezizp2012 yezizp2012 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Rest LGTM! Thx for the great job, it will be very helpful for debugging in rw.

Comment thread src/frontend/src/handler/create_index.rs Outdated
Comment thread src/meta/src/manager/catalog/mod.rs Outdated
@codecov

codecov Bot commented Jul 25, 2023 •

Copy link
Copy Markdown

Codecov Report

Merging #11199 (0050a9b) into main (c6b490f) will decrease coverage by 0.02%.
The diff coverage is 32.07%.

@@            Coverage Diff             @@
##             main   #11199      +/-   ##
==========================================
- Coverage   69.68%   69.66%   -0.02%     
==========================================
  Files        1351     1351              
  Lines      224437   224531      +94     
==========================================
+ Hits       156392   156417      +25     
- Misses      68045    68114      +69     
Flag Coverage Δ
rust 69.66% <32.07%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
...rc/catalog/system_catalog/rw_catalog/rw_indexes.rs 0.00% <0.00%> (ø)
...system_catalog/rw_catalog/rw_materialized_views.rs 0.00% <0.00%> (ø)
...alog/system_catalog/rw_catalog/rw_relation_info.rs 0.00% <0.00%> (ø)
.../src/catalog/system_catalog/rw_catalog/rw_sinks.rs 0.00% <0.00%> (ø)
...src/catalog/system_catalog/rw_catalog/rw_tables.rs 0.00% <0.00%> (ø)
src/meta/src/manager/streaming_job.rs 19.04% <0.00%> (-5.70%) ⬇️
src/meta/src/rpc/ddl_controller.rs 0.00% <0.00%> (ø)
src/meta/src/manager/catalog/mod.rs 24.35% <10.00%> (-0.04%) ⬇️
src/frontend/src/catalog/index_catalog.rs 78.28% <50.00%> (-0.77%) ⬇️
...rc/catalog/system_catalog/rw_catalog/rw_sources.rs 26.08% <50.00%> (+1.47%) ⬆️
... and 11 more

... and 2 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@shanicky shanicky changed the title feat: add optional created_at and started_at for rw relations feat: add optional created_at and initialized_at for rw relations Jul 25, 2023
@shanicky
shanicky force-pushed the peng/created_at branch 2 times, most recently from 4cb4024 to 5c51584 Compare July 25, 2023 10:59
@shanicky shanicky linked an issue Jul 25, 2023 that may be closed by this pull request
Shanicky Chen and others added 3 commits July 25, 2023 20:04
…me` & `read_meta_snapshot` methods

Add optional timestamps to Table message and remove created_at_epoch field.

Remove import std::time::Duration in no_shuffle_backfill.rs

Add optional fields `started_at_epoch` and `created_at_epoch` in multiple files and structs.

Add optional fields to Sink message, SinkDesc, SinkCatalog and set created_at_epoch time

feat: Add optional fields to Source message

Replace 'started_at_epoch' with 'initialized_at_epoch' in multiple message definitions and struct fields.
@shanicky
shanicky requested a review from yezizp2012 July 25, 2023 12:17
@shanicky shanicky removed the user-facing-changes Contains changes that are visible to users label Jul 25, 2023
@github-actions github-actions Bot added the user-facing-changes Contains changes that are visible to users label Jul 25, 2023

@yezizp2012 yezizp2012 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!!

Comment thread src/meta/src/manager/streaming_job.rs Outdated
@shanicky shanicky removed the user-facing-changes Contains changes that are visible to users label Jul 25, 2023
@shanicky
shanicky enabled auto-merge July 25, 2023 12:28
@github-actions github-actions Bot added the user-facing-changes Contains changes that are visible to users label Jul 25, 2023
@shanicky
shanicky added this pull request to the merge queue Jul 25, 2023
Merged via the queue into main with commit 8f4d302 Jul 25, 2023
@shanicky
shanicky deleted the peng/created_at branch July 25, 2023 13:46
@shanicky

Copy link
Copy Markdown
Contributor Author

cc @neverchanje

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/feature Type: New feature. user-facing-changes Contains changes that are visible to users 📖✓ Covered or will be covered in the user docs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(catalog): add created_at for all relations for better debugging

3 participants