提交 8e19069c 编写于 作者: J Jiang Haiting

fix test error

上级 a9a7dfa7
...@@ -637,7 +637,7 @@ public class SendMessageProcessor extends AbstractSendMessageProcessor implement ...@@ -637,7 +637,7 @@ public class SendMessageProcessor extends AbstractSendMessageProcessor implement
private String diskUtil() { private String diskUtil() {
double physicRatio = -1; double physicRatio = -1;
String storePath =this.brokerController.getMessageStoreConfig().getStorePathCommitLog(); String storePath = this.brokerController.getMessageStoreConfig().getStorePathCommitLog();
if (storePath.contains(MessageStoreConfig.MULTI_PATH_SPLITTER)) { if (storePath.contains(MessageStoreConfig.MULTI_PATH_SPLITTER)) {
String[] paths = storePath.trim().split(MessageStoreConfig.MULTI_PATH_SPLITTER); String[] paths = storePath.trim().split(MessageStoreConfig.MULTI_PATH_SPLITTER);
for (String storePathPhysic : paths) { for (String storePathPhysic : paths) {
......
...@@ -411,7 +411,7 @@ public class MappedFileQueue { ...@@ -411,7 +411,7 @@ public class MappedFileQueue {
destroy = maxOffsetInLogicQueue < offset; destroy = maxOffsetInLogicQueue < offset;
if (destroy) { if (destroy) {
log.info("physic min offset " + offset + ", logics in current mappedFile max offset " log.info("physic min offset " + offset + ", logics in current mappedFile max offset "
+ maxOffsetInLogicQueue + ", delete it"); + maxOffsetInLogicQueue + ", delete it");
} }
} else if (!mappedFile.isAvailable()) { // Handle hanged file. } else if (!mappedFile.isAvailable()) { // Handle hanged file.
log.warn("Found a hanged consume queue file, attempting to delete it."); log.warn("Found a hanged consume queue file, attempting to delete it.");
...@@ -479,7 +479,7 @@ public class MappedFileQueue { ...@@ -479,7 +479,7 @@ public class MappedFileQueue {
if (firstMappedFile != null && lastMappedFile != null) { if (firstMappedFile != null && lastMappedFile != null) {
if (offset < firstMappedFile.getFileFromOffset() || offset >= lastMappedFile.getFileFromOffset() + this.mappedFileSize) { if (offset < firstMappedFile.getFileFromOffset() || offset >= lastMappedFile.getFileFromOffset() + this.mappedFileSize) {
LOG_ERROR.warn("Offset not matched. Request offset: {}, firstOffset: {}, lastOffset: {}, mappedFileSize: {}, mappedFiles count: {}", LOG_ERROR.warn("Offset not matched. Request offset: {}, firstOffset: {}, lastOffset: {}, mappedFileSize: {}, mappedFiles count: {}",
offset, offset,
firstMappedFile.getFileFromOffset(), firstMappedFile.getFileFromOffset(),
lastMappedFile.getFileFromOffset() + this.mappedFileSize, lastMappedFile.getFileFromOffset() + this.mappedFileSize,
this.mappedFileSize, this.mappedFileSize,
...@@ -493,7 +493,7 @@ public class MappedFileQueue { ...@@ -493,7 +493,7 @@ public class MappedFileQueue {
} }
if (targetFile != null && offset >= targetFile.getFileFromOffset() if (targetFile != null && offset >= targetFile.getFileFromOffset()
&& offset < targetFile.getFileFromOffset() + this.mappedFileSize) { && offset < targetFile.getFileFromOffset() + this.mappedFileSize) {
return targetFile; return targetFile;
} }
......
...@@ -18,7 +18,6 @@ package org.apache.rocketmq.store; ...@@ -18,7 +18,6 @@ package org.apache.rocketmq.store;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
import java.util.function.Supplier; import java.util.function.Supplier;
......
...@@ -17,9 +17,6 @@ ...@@ -17,9 +17,6 @@
package org.apache.rocketmq.store.config; package org.apache.rocketmq.store.config;
import java.io.File; import java.io.File;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.apache.rocketmq.common.annotation.ImportantField; import org.apache.rocketmq.common.annotation.ImportantField;
import org.apache.rocketmq.store.ConsumeQueue; import org.apache.rocketmq.store.ConsumeQueue;
......
...@@ -73,7 +73,7 @@ public class MultiPathMappedFileQueueTest { ...@@ -73,7 +73,7 @@ public class MultiPathMappedFileQueueTest {
mappedFileQueue.load(); mappedFileQueue.load();
assertThat(mappedFileQueue.mappedFiles.size()).isEqualTo(1025); assertThat(mappedFileQueue.mappedFiles.size()).isEqualTo(1024);
mappedFileQueue.destroy(); mappedFileQueue.destroy();
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册