mirror of
https://github.com/apache/rocketmq.git
synced 2026-09-21 13:49:50 +08:00
Restore the lost PR 3460 (#10067)
This commit is contained in:
@@ -1095,7 +1095,6 @@ public class CommitLog implements Swappable {
|
||||
}
|
||||
if (null == mappedFile) {
|
||||
log.error("create mapped file1 error, topic: {} clientAddr: {}", msg.getTopic(), msg.getBornHostString());
|
||||
beginTimeInLock = 0;
|
||||
return CompletableFuture.completedFuture(new PutMessageResult(PutMessageStatus.CREATE_MAPPED_FILE_FAILED, null));
|
||||
}
|
||||
|
||||
@@ -1112,7 +1111,6 @@ public class CommitLog implements Swappable {
|
||||
if (null == mappedFile) {
|
||||
// XXX: warn and notify me
|
||||
log.error("create mapped file2 error, topic: {} clientAddr: {}", msg.getTopic(), msg.getBornHostString());
|
||||
beginTimeInLock = 0;
|
||||
return CompletableFuture.completedFuture(new PutMessageResult(PutMessageStatus.CREATE_MAPPED_FILE_FAILED, result));
|
||||
}
|
||||
if (isCloseReadAhead()) {
|
||||
@@ -1125,17 +1123,15 @@ public class CommitLog implements Swappable {
|
||||
break;
|
||||
case MESSAGE_SIZE_EXCEEDED:
|
||||
case PROPERTIES_SIZE_EXCEEDED:
|
||||
beginTimeInLock = 0;
|
||||
return CompletableFuture.completedFuture(new PutMessageResult(PutMessageStatus.MESSAGE_ILLEGAL, result));
|
||||
case UNKNOWN_ERROR:
|
||||
default:
|
||||
beginTimeInLock = 0;
|
||||
return CompletableFuture.completedFuture(new PutMessageResult(PutMessageStatus.UNKNOWN_ERROR, result));
|
||||
}
|
||||
|
||||
elapsedTimeInLock = this.defaultMessageStore.getSystemClock().now() - beginLockTimestamp;
|
||||
beginTimeInLock = 0;
|
||||
} finally {
|
||||
beginTimeInLock = 0;
|
||||
putMessageLock.unlock();
|
||||
}
|
||||
// Increase queue offset when messages are successfully written
|
||||
@@ -1260,7 +1256,6 @@ public class CommitLog implements Swappable {
|
||||
}
|
||||
if (null == mappedFile) {
|
||||
log.error("Create mapped file1 error, topic: {} clientAddr: {}", messageExtBatch.getTopic(), messageExtBatch.getBornHostString());
|
||||
beginTimeInLock = 0;
|
||||
return CompletableFuture.completedFuture(new PutMessageResult(PutMessageStatus.CREATE_MAPPED_FILE_FAILED, null));
|
||||
}
|
||||
|
||||
@@ -1275,7 +1270,6 @@ public class CommitLog implements Swappable {
|
||||
if (null == mappedFile) {
|
||||
// XXX: warn and notify me
|
||||
log.error("Create mapped file2 error, topic: {} clientAddr: {}", messageExtBatch.getTopic(), messageExtBatch.getBornHostString());
|
||||
beginTimeInLock = 0;
|
||||
return CompletableFuture.completedFuture(new PutMessageResult(PutMessageStatus.CREATE_MAPPED_FILE_FAILED, result));
|
||||
}
|
||||
if (isCloseReadAhead()) {
|
||||
@@ -1285,17 +1279,15 @@ public class CommitLog implements Swappable {
|
||||
break;
|
||||
case MESSAGE_SIZE_EXCEEDED:
|
||||
case PROPERTIES_SIZE_EXCEEDED:
|
||||
beginTimeInLock = 0;
|
||||
return CompletableFuture.completedFuture(new PutMessageResult(PutMessageStatus.MESSAGE_ILLEGAL, result));
|
||||
case UNKNOWN_ERROR:
|
||||
default:
|
||||
beginTimeInLock = 0;
|
||||
return CompletableFuture.completedFuture(new PutMessageResult(PutMessageStatus.UNKNOWN_ERROR, result));
|
||||
}
|
||||
|
||||
elapsedTimeInLock = this.defaultMessageStore.getSystemClock().now() - beginLockTimestamp;
|
||||
beginTimeInLock = 0;
|
||||
} finally {
|
||||
beginTimeInLock = 0;
|
||||
putMessageLock.unlock();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user