Skip to content
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

Fixed construct the snapshot time #3974

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -536,8 +536,6 @@ private SnapshotImpl createSnapshot(LogSegment initSegment, Engine engine) {
initSegment,
Optional.ofNullable(latestSnapshotHint.get()));

assertLogFilesBelongToTable(logPath, initSegment.allLogFilesUnsorted());

final SnapshotImpl snapshot =
new SnapshotImpl(
tablePath, initSegment, logReplay, logReplay.getProtocol(), logReplay.getMetadata());
Expand All @@ -549,6 +547,8 @@ private SnapshotImpl createSnapshot(LogSegment initSegment, Engine engine) {
initSegment.version,
startingFromStr);

assertLogFilesBelongToTable(logPath, initSegment.allLogFilesUnsorted());
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe the main goal of the log statement above is to print out how long it took to load the protocol and metadata objects during LogReplay.

So I think the easiest thing to do would be to update the log statement (to not directly mention constructing the snapshot) and move it to right after the LogReplay instance is created. what do you think?


final SnapshotHint hint =
new SnapshotHint(
snapshot.getVersion(engine), snapshot.getProtocol(), snapshot.getMetadata());
Expand Down
Loading