Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,7 @@ public void updateNextVisibleTime(String topic, String group, int queueId, long
updateLockFreeTimestamp(topic, group, queueId, orderInfo);
}

@VisibleForTesting
protected void autoClean() {
public void autoClean() {
if (brokerController == null) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,9 @@ public GetMessageResult getMessage(String clientHost, String group, String lmqNa
}

public class PopLiteLockManager extends ServiceThread {
private static final long AUTO_CLEAN_INTERVAL = 5 * 60 * 1000;
private long lastCleanTime = System.currentTimeMillis();

@Override
public String getServiceName() {
if (brokerController.getBrokerConfig().isInBrokerContainer()) {
Expand All @@ -452,6 +455,10 @@ public void run() {
try {
waitForRunning(60000);
lockService.removeTimeout();
if (System.currentTimeMillis() - lastCleanTime >= AUTO_CLEAN_INTERVAL) {
((MemoryConsumerOrderInfoManager) consumerOrderInfoManager).autoClean();
lastCleanTime = System.currentTimeMillis();
}
} catch (Exception ignored) {
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static String getStorePathBatchConsumeQueue(final String rootDir) {
}

public static String getStorePathRocksDBConsumeQueue(final String rootDir) {
return rootDir + File.separator + "consumequeue_r";
return rootDir + File.separator + "consumequeue_rocksdb";
}

public static String getStorePathIndex(final String rootDir) {
Expand Down
Loading