Skip to content

Db enummification - #687

Merged
bnaecker merged 2 commits into
mainfrom
db-enummification
Feb 22, 2022
Merged

bnaecker merged 2 commits into
mainfrom
db-enummification

Conversation

@bnaecker

Copy link
Copy Markdown
Collaborator

No description provided.

@bnaecker

bnaecker commented Feb 16, 2022 •

Copy link
Copy Markdown
Collaborator Author

This does some small cleanup towards finishing #312. It adds the instance and saga state enums in the database schema, and adds conversions for them.

Note that the disk_state and saga_node_event_type enums are probably going to be harder. Those carry data in some of their variants, which is usually recorded in a separate column in their tables. It should be possible to use a struct with two fields, and then #[diesel(embed)] that into the parent struct. I've opted to defer that for now.

- Adds the `instance_state` enum as a new DB type with conversion
- Adds the `saga_state` enum as a new DB type with conversion

@smklein smklein left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the cleanup!

Comment thread common/src/sql/dbinit.sql Resolved
Comment thread common/src/sql/dbinit.sql Resolved
@bnaecker
bnaecker enabled auto-merge (squash) February 22, 2022 18:29
@bnaecker
bnaecker merged commit 165e541 into main Feb 22, 2022
@bnaecker
bnaecker deleted the db-enummification branch February 22, 2022 19:02
leftwo pushed a commit that referenced this pull request Apr 30, 2024
Propolis:
Update oximeter dependency to pull in automatic producer registration (#689)
Propagate ReplaceResult up; return disk status (#687)
Enable clippy warnings for lossless casts
Update rustls deps for CVE-2024-32650
migration: refrain from offering all pages when possible (#682)

Crucible:
DTrace probes for IO on/off the network (#1284)
Update oximeter dep to pull in automatic producer registration (#1279)
Remove `ReadResponse` in favor of `RawReadResponse` (#1212)
Fix typo in DTrace upstairs_info (#1276)
replace needing no work should not be an error (#1275)
Add some DTrace scripts to the package. (#1274)
More Pantry updates for Region replacement (#1269)
Send the correct task count for reconciliations (#1271)
Raw extent cleanup (#1268)
leftwo added a commit that referenced this pull request Apr 30, 2024
Propolis:
Update oximeter dependency to pull in automatic producer registration (#689)
Propagate ReplaceResult up; return disk status (#687)
Enable clippy warnings for lossless casts
Update rustls deps for CVE-2024-32650
migration: refrain from offering all pages when possible (#682)

Crucible:
DTrace probes for IO on/off the network (#1284)
Update oximeter dep to pull in automatic producer registration (#1279)
Remove `ReadResponse` in favor of `RawReadResponse` (#1212)
Fix typo in DTrace upstairs_info (#1276)
replace needing no work should not be an error (#1275)
Add some DTrace scripts to the package. (#1274)
More Pantry updates for Region replacement (#1269)
Send the correct task count for reconciliations (#1271)
Raw extent cleanup (#1268)

---------

Co-authored-by: Alan Hanson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants