fix bug : update lastLogMark after journal file forceWrite#2983
fix bug : update lastLogMark after journal file forceWrite#2983lordcheng10 wants to merge 1 commit intoapache:masterfrom
Conversation
|
rerun failure checks |
|
rerun failure checks |
|
ping |
3 similar comments
|
ping |
|
ping |
|
ping |
|
@eolivelli PTAL,thanks! |
|
ping |
|
@dlg99 @eolivelli @merlimat PTAL,thanks! |
|
ping |
1 similar comment
|
ping |
|
@dlg99 PTAL,thanks! |
eolivelli
left a comment
There was a problem hiding this comment.
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. |
| .registerSuccessfulEvent(MathUtils.elapsedNanos(startTime), TimeUnit.NANOSECONDS); | ||
| lastLogMark.setCurLogMark(this.logId, this.lastFlushedPosition); | ||
| } | ||
| lastLogMark.setCurLogMark(this.logId, this.lastFlushedPosition); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
do you see any code path in which we arrive here and the journal has not been flushed and fsync'd ?
|
fix old workflow,please see #3455 for detail |
|
The ForceWriteRequest flush logic has been changed in the master branch, please confirm if the master code covered this change, thanks. @lordcheng10 |
|
I close this PR. If you still have the issues, please reopen it. @lordcheng10 |
Motivation
update lastLogMark after journal file forceWrite