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

fix bug : update lastLogMark after journal file forceWrite #2983

Conversation

lordcheng10
Copy link
Contributor

Motivation

update lastLogMark after journal file forceWrite

@lordcheng10
Copy link
Contributor Author

rerun failure checks

@lordcheng10 lordcheng10 changed the title update lastLogMark after journal file forceWrite fix bug : update lastLogMark after journal file forceWrite Jan 11, 2022
Copy link
Contributor

@StevenLuMT StevenLuMT left a comment

Choose a reason for hiding this comment

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

LGTM

@lordcheng10
Copy link
Contributor Author

rerun failure checks

@lordcheng10
Copy link
Contributor Author

ping

3 similar comments
@lordcheng10
Copy link
Contributor Author

ping

@lordcheng10
Copy link
Contributor Author

ping

@lordcheng10
Copy link
Contributor Author

ping

Copy link
Contributor

@hangc0276 hangc0276 left a comment

Choose a reason for hiding this comment

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

Nice catch.

@lordcheng10
Copy link
Contributor Author

@eolivelli PTAL,thanks!

@lordcheng10
Copy link
Contributor Author

ping

@lordcheng10
Copy link
Contributor Author

@dlg99 @eolivelli @merlimat PTAL,thanks!

@lordcheng10
Copy link
Contributor Author

ping

1 similar comment
@lordcheng10
Copy link
Contributor Author

ping

@lordcheng10
Copy link
Contributor Author

@dlg99 PTAL,thanks!

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

Can you please explain the problem you want to solve?

@lordcheng10
Copy link
Contributor Author

Can you please explain the problem you want to solve?

Sorry, I didn't describe the problem clearly. @eolivelli

The lastLogMark update here should be updated after forceWrite is executed. Because it is possible that some data is still not flushed to the disk in the page cache, if the lastLogMark is updated at this time, when the node goes down, data may be lost.

}
lastLogMark.setCurLogMark(this.logId, this.lastFlushedPosition);
Copy link
Contributor

@eolivelli eolivelli Jul 29, 2022

Choose a reason for hiding this comment

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

I think that we can reach this point in some cases when there is no need to force

for instance here we are closing the file

Copy link
Contributor

Choose a reason for hiding this comment

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

do you see any code path in which we arrive here and the journal has not been flushed and fsync'd ?

@hangc0276 hangc0276 modified the milestones: 4.16.0, 4.17.0 Jul 31, 2022
@StevenLuMT
Copy link
Contributor

fix old workflow,please see #3455 for detail

@hangc0276
Copy link
Contributor

The ForceWriteRequest flush logic has been changed in the master branch, please confirm if the master code covered this change, thanks. @lordcheng10

@hangc0276
Copy link
Contributor

I close this PR. If you still have the issues, please reopen it. @lordcheng10

@hangc0276 hangc0276 closed this Oct 7, 2023
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.

None yet

5 participants