Skip to content
Merged
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 @@ -236,8 +236,8 @@ public long getPopOffset(String groupId, String topicId, int queueId, int initMo
public CompletableFuture<GetMessageResult> getMessageAsync(String clientHost,
String groupId, String topicId, int queueId, long offset, int batchSize, MessageFilter filter) {

log.debug("PopConsumerService getMessageAsync, groupId={}, topicId={}, queueId={}, offset={}, batchSize={}, filter={}",
groupId, topicId, offset, queueId, batchSize, filter != null);
log.debug("PopConsumerService getMessageAsync, groupId={}, topicId={}, queueId={}, " +
"offset={}, batchSize={}, filter={}", groupId, topicId, queueId, offset, batchSize, filter != null);

CompletableFuture<GetMessageResult> getMessageFuture =
brokerController.getMessageStore().getMessageAsync(groupId, topicId, queueId, offset, batchSize, filter);
Expand Down Expand Up @@ -552,7 +552,7 @@ public CompletableFuture<Boolean> revive(PopConsumerRecord record) {

@SuppressWarnings("StatementWithEmptyBody")
public void clearCache(String groupId, String topicId, int queueId) {
while (consumerLockService.tryLock(groupId, topicId)) {
while (!consumerLockService.tryLock(groupId, topicId)) {
}
try {
if (popConsumerCache != null) {
Expand Down Expand Up @@ -592,7 +592,7 @@ public long revive(AtomicLong currentTime, int maxCount) {
if (!result) {
if (record.getAttemptTimes() < brokerConfig.getPopReviveMaxAttemptTimes()) {
long backoffInterval = 1000L * REWRITE_INTERVALS_IN_SECONDS[
Math.min(REWRITE_INTERVALS_IN_SECONDS.length, record.getAttemptTimes())];
Math.min(REWRITE_INTERVALS_IN_SECONDS.length - 1, record.getAttemptTimes())];
long nextInvisibleTime = record.getInvisibleTime() + backoffInterval;
PopConsumerRecord retryRecord = new PopConsumerRecord(System.currentTimeMillis(),
record.getGroupId(), record.getTopicId(), record.getQueueId(),
Expand Down Expand Up @@ -760,7 +760,7 @@ public synchronized void transferToFsStore() {
ck.setQueueId(record.getQueueId());
ck.setBrokerName(brokerConfig.getBrokerName());
ck.addDiff(0);
ck.setRePutTimes(ck.getRePutTimes());
ck.setRePutTimes(String.valueOf(record.getAttemptTimes()));
int reviveQueueId = (int) record.getOffset() % brokerConfig.getReviveQueueNum();
MessageExtBrokerInner ckMsg =
brokerController.getPopMessageProcessor().buildCkMsg(ck, reviveQueueId);
Expand Down
Loading