-
Notifications
You must be signed in to change notification settings - Fork 76
feat: add rolling manifest writer #443
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
base: main
Are you sure you want to change the base?
Conversation
a7bb821 to
24182ac
Compare
| /// \brief Add an added entry for a file. | ||
| /// | ||
| /// \param file a data file | ||
| /// \return Status::OK() if the entry was written successfully |
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.
Unrelated to this PR: I think we don't have Status::OK() method. We may need to fix all these comments to not confuse readers.
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.
Changed to \return Status indicating success or failure
| RollingManifestWriter::~RollingManifestWriter() { | ||
| // Ensure we close the current writer if not already closed | ||
| if (!closed_) { | ||
| (void)CloseCurrentWriter(); |
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.
| (void)CloseCurrentWriter(); | |
| std::ignore = CloseCurrentWriter(); |
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.
BTW, why not directly calling Close() so you don't need to check closed_?
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.
Changed to Close()
| if (length_result.has_value()) { | ||
| return length_result.value() >= target_file_size_in_bytes_; | ||
| } | ||
| // If we can't get the length, don't roll |
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.
Not sure if this is a good idea. What if it is a fatal error returned by the underlying writer?
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.
I left this as a TODO, let's revisit this later.
No description provided.