-
Notifications
You must be signed in to change notification settings - Fork 374
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(storage): support soft delete timestamps #13728
feat(storage): support soft delete timestamps #13728
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #13728 +/- ##
=======================================
Coverage 93.26% 93.27%
=======================================
Files 2229 2229
Lines 193104 193184 +80
=======================================
+ Hits 180105 180184 +79
- Misses 12999 13000 +1 ☔ View full report in Codecov by Sentry. |
return *this; | ||
} | ||
|
||
/// Returns true if the object has a soft delete timestamp. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/soft/hard/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
return *this; | ||
} | ||
|
||
/// @note THis is only intended for mocking. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/THis/This/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
@@ -505,6 +505,50 @@ class ObjectMetadata { | |||
return *this; | |||
} | |||
|
|||
/// Returns true if the object has a soft delete timestamp. | |||
bool has_soft_delete_time() const { return soft_delete_time_.has_value(); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not have one method that returns the optional<>?
Is it consistency with has_owner()
, for example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All other timestamps (and all other scalars really) return a default value when not set. If we had a time machine I would probably go back and do something different, but I am not sure it is worth changing the approach on only new fields.
Part of the work for #13575
This change is