Skip to content

MINOR: deleteHorizonMs update to documentation and DumpLogSegments tool#11694

Merged
hachikuji merged 3 commits intoapache:trunkfrom
mattwong949:dump-log-segments-deleteHorizon
Feb 5, 2022
Merged

MINOR: deleteHorizonMs update to documentation and DumpLogSegments tool#11694
hachikuji merged 3 commits intoapache:trunkfrom
mattwong949:dump-log-segments-deleteHorizon

Conversation

@mattwong949
Copy link
Copy Markdown
Contributor

@mattwong949 mattwong949 commented Jan 20, 2022

This PR updates the documentation and tooling to match the changes made in #10914

In the documentation, changes include the adding the new attribute and updating field names.

In the DumpLogSegments tool, when record batch information is printed, it will also include what the value of deleteHorizonMs is ( OptionalLong.empty or OptionalLong[123456] )

Copy link
Copy Markdown
Contributor

@vincent81jiang vincent81jiang left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you

Copy link
Copy Markdown
Contributor

@hachikuji hachikuji left a comment

Choose a reason for hiding this comment

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

Thanks. While we're updating documentation, there are some comments about the old FirstTimestamp field in DefaultRecordBatch that seem outdated.

* There is no similar need to preserve the timestamp from the original batch after compaction. The BaseTimestamp
* field therefore always reflects the timestamp of the first record in the batch. If the batch is empty, the
* FirstTimestamp will be set to -1 (NO_TIMESTAMP).
* BaseTimestamp will be set to -1 (NO_TIMESTAMP).
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.

The comment is still inaccurate, no? The base timestamp does not always reflect the timestamp of the first record in the batch.

Copy link
Copy Markdown
Contributor Author

@mattwong949 mattwong949 Jan 25, 2022

Choose a reason for hiding this comment

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

you are right, thanks for the catch. I've revised the comments to be accurate about BaseTimestamp after compaction.

Copy link
Copy Markdown
Contributor

@Kvicii Kvicii left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Contributor

@hachikuji hachikuji left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the patch!

@hachikuji hachikuji merged commit 17dcb80 into apache:trunk Feb 5, 2022
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.

4 participants