mirror of
https://github.com/apache/rocketmq.git
synced 2026-09-21 13:49:50 +08:00
[ISSUE ##3832] in order to improve the performance by change the variable location of queueId (#3833)
* change variable queueId location * [fix]the wildcard Co-authored-by: tanghailin <tanghailin@58.com>
This commit is contained in:
co-authored by
tanghailin
parent
8fa9ca592c
commit
4992f4ee9c
@@ -16,22 +16,6 @@
|
||||
*/
|
||||
package org.apache.rocketmq.store;
|
||||
|
||||
import java.net.Inet4Address;
|
||||
import java.net.Inet6Address;
|
||||
import java.net.InetAddress;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.SocketAddress;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import org.apache.rocketmq.common.ServiceThread;
|
||||
import org.apache.rocketmq.common.UtilAll;
|
||||
import org.apache.rocketmq.common.constant.LoggerName;
|
||||
@@ -50,6 +34,22 @@ import org.apache.rocketmq.store.config.MessageStoreConfig;
|
||||
import org.apache.rocketmq.store.ha.HAService;
|
||||
import org.apache.rocketmq.store.schedule.ScheduleMessageService;
|
||||
|
||||
import java.net.Inet4Address;
|
||||
import java.net.Inet6Address;
|
||||
import java.net.InetAddress;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.SocketAddress;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/**
|
||||
* Store all metadata downtime for recovery, data protection reliability
|
||||
*/
|
||||
@@ -608,8 +608,7 @@ public class CommitLog {
|
||||
StoreStatsService storeStatsService = this.defaultMessageStore.getStoreStatsService();
|
||||
|
||||
String topic = msg.getTopic();
|
||||
int queueId = msg.getQueueId();
|
||||
|
||||
// int queueId msg.getQueueId();
|
||||
final int tranType = MessageSysFlag.getTransactionValue(msg.getSysFlag());
|
||||
if (tranType == MessageSysFlag.TRANSACTION_NOT_TYPE
|
||||
|| tranType == MessageSysFlag.TRANSACTION_COMMIT_TYPE) {
|
||||
@@ -620,7 +619,7 @@ public class CommitLog {
|
||||
}
|
||||
|
||||
topic = TopicValidator.RMQ_SYS_SCHEDULE_TOPIC;
|
||||
queueId = ScheduleMessageService.delayLevel2QueueId(msg.getDelayTimeLevel());
|
||||
int queueId = ScheduleMessageService.delayLevel2QueueId(msg.getDelayTimeLevel());
|
||||
|
||||
// Backup real topic, queueId
|
||||
MessageAccessor.putProperty(msg, MessageConst.PROPERTY_REAL_TOPIC, msg.getTopic());
|
||||
|
||||
Reference in New Issue
Block a user