未验证 提交 fd7da350 编写于 作者: S spiritsx 提交者: GitHub

[ISSUE #2338] use commitLeastPages parameters and substitute...

[ISSUE #2338] use commitLeastPages parameters and substitute 'lastCommittedPosition' for duplicated 'this.committedPosition.get()' in 'commit0' method (#2338) (#2346)
上级 3f48c174
......@@ -321,7 +321,7 @@ public class MappedFile extends ReferenceResource {
int writePos = this.wrotePosition.get();
int lastCommittedPosition = this.committedPosition.get();
if (writePos - this.committedPosition.get() > 0) {
if (writePos - lastCommittedPosition > commitLeastPages) {
try {
ByteBuffer byteBuffer = writeBuffer.slice();
byteBuffer.position(lastCommittedPosition);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册