Skip to content

Conversation

@luoyuxia
Copy link
Contributor

@luoyuxia luoyuxia commented Dec 22, 2025

Purpose

Linked issue: close #2224

Brief change log

  • In TieringCommitOperator, first prepare commit log offsets to fluss cluster which will write a file to store the log offsets
  • then, record the file path in lake snapshot property, commit the snapshot

Tests

Existing test

API and Format

Documentation

@luoyuxia luoyuxia force-pushed the allow-commit-offset-to-fluss branch from 33969e9 to 5442462 Compare December 22, 2025 08:45
@luoyuxia luoyuxia requested a review from Copilot December 22, 2025 08:47
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@luoyuxia luoyuxia force-pushed the allow-commit-offset-to-fluss branch from 5442462 to 68a5039 Compare December 22, 2025 12:49
@luoyuxia luoyuxia marked this pull request as ready for review December 22, 2025 13:00
@luoyuxia luoyuxia requested a review from Copilot December 22, 2025 13:00
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 30 out of 30 changed files in this pull request and generated 12 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@luoyuxia luoyuxia force-pushed the allow-commit-offset-to-fluss branch 2 times, most recently from 06af001 to 3889069 Compare December 22, 2025 13:22
@luoyuxia luoyuxia changed the title Allow commit offset to fluss [lake] Record a file path storing log offsets in lake snapshot property Dec 23, 2025
@luoyuxia luoyuxia marked this pull request as draft December 24, 2025 03:07
@luoyuxia luoyuxia force-pushed the allow-commit-offset-to-fluss branch from a6c7f69 to 747e91b Compare December 24, 2025 12:35
@luoyuxia luoyuxia requested a review from Copilot December 24, 2025 12:36
@luoyuxia luoyuxia force-pushed the allow-commit-offset-to-fluss branch from 747e91b to f31d6f5 Compare December 24, 2025 12:40
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 42 out of 42 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 43 out of 43 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@luoyuxia luoyuxia force-pushed the allow-commit-offset-to-fluss branch from 37c8016 to f7a09fa Compare December 25, 2025 02:06
@luoyuxia luoyuxia marked this pull request as ready for review December 25, 2025 02:06
@luoyuxia luoyuxia force-pushed the allow-commit-offset-to-fluss branch from f7a09fa to f470b32 Compare December 25, 2025 02:27
@luoyuxia
Copy link
Contributor Author

@wuchong Could you please help review this pr? The pr also handle the back compabitlity when use v2 to serialize lake table snapshot

@luoyuxia luoyuxia force-pushed the allow-commit-offset-to-fluss branch from f470b32 to 0451cbf Compare December 26, 2025 02:19
optional int64 max_timestamp = 6;
}

message PbPrepareCommitLakeTableRespForTable {
Copy link
Member

Choose a reason for hiding this comment

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

add a table_id field, as the PrepareCommitLakeTableSnapshotRequest request has multiple table ids, we need to distinguish which table is the PbPrepareCommitLakeTableRespForTable belong to.

Copy link
Contributor Author

@luoyuxia luoyuxia Dec 29, 2025

Choose a reason for hiding this comment

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

I was thinking to use array index to distinguish the PbPrepareCommitLakeTableRespForTable belong to. It's a week contract. I'm fine with attaching table id which is a stronger contract, and also align with CommitLakeTableSnapshotRequest

@luoyuxia luoyuxia force-pushed the allow-commit-offset-to-fluss branch from 1c1722e to 9f517ed Compare December 29, 2025 03:25
@luoyuxia luoyuxia force-pushed the allow-commit-offset-to-fluss branch from 9f517ed to 97849a9 Compare December 29, 2025 04:02
@luoyuxia
Copy link
Contributor Author

@wuchong Thanks for review. Comments has been addressed

Copy link
Member

@wuchong wuchong left a comment

Choose a reason for hiding this comment

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

Thanks @luoyuxia for the updating. I only left some final comments.

Comment on lines 1320 to 1324
coordinatorEventManager.put(
new NotifyLakeTableOffsetEvent(
commitLakeTableSnapshotData.getLakeTableSnapshot(),
commitLakeTableSnapshotData
.getTableBucketsMaxTieredTimestamp()));
Copy link
Member

Choose a reason for hiding this comment

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

Moving the event-publishing logic into the forEach loop would cause the event to be sent multiple times, since the event is intended for all table ids, not per individual table.

Comment on lines 1282 to 1286
coordinatorEventManager.put(
new NotifyLakeTableOffsetEvent(
lakeTableSnapshots,
commitLakeTableSnapshotData
.getTableBucketsMaxTieredTimestamp()));
Copy link
Member

Choose a reason for hiding this comment

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

ditto

optional int32 error_code = 1;
optional string error_message = 2;
optional int64 table_id = 3;
optional string lake_table_bucket_offsets_path = 4;
Copy link
Member

Choose a reason for hiding this comment

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

lake_table_offsets_path to align with the TableOffsets concept.

* completeness
* <li>Stores the merged snapshot to the remote file system. The stored file contains the log
* end offset information for each bucket in the table
* <li>Returns the file path where the snapshot is stored
Copy link
Member

Choose a reason for hiding this comment

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

Add an item for the second phase.

<li>Call {@link #commitLakeTableSnapshot(CommitLakeTableSnapshotRequest)} with the offset
     *       file path to finalize the snapshot commit to ZooKeeper in the second phase.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Record a file path storing log offsets in lake snapshot property

2 participants