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 @@ -1543,10 +1543,6 @@ protected void shutdownBasicService() {
this.consumerFilterManager.persist();
}

if (this.consumerOrderInfoManager != null) {
this.consumerOrderInfoManager.persist();
}

if (this.scheduleMessageService != null) {
this.scheduleMessageService.persist();
this.scheduleMessageService.shutdown();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,10 @@ public long queryPullOffset(final String group, final String topic, final int qu
return offset;
}

public void clearPullOffset(final String group, final String topic) {
this.pullOffsetTable.remove(topic + TOPIC_GROUP_SEPARATOR + group);
}

@Override
public String encode() {
return this.encode(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2262,8 +2262,7 @@ private RemotingCommand resetOffsetInner(String topic, String group, int queueId
}
if (brokerController.getBrokerConfig().isPopConsumerKVServiceEnable()) {
brokerController.getPopConsumerService().clearCache(group, topic, entry.getKey());
brokerController.getConsumerOffsetManager().commitPullOffset(
"ResetOffsetInner", group, topic, entry.getKey(), entry.getValue());
brokerController.getConsumerOffsetManager().clearPullOffset(group, topic);
}
body.getOffsetTable().put(new MessageQueue(topic, brokerName, entry.getKey()), entry.getValue());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ public void removeOffsetByGroupTest() {
consumerOffsetManager.commitPullOffset("Pull", group, topic, 0, 100);
consumerOffsetManager.removeOffset(group);
Assert.assertFalse(consumerOffsetManager.getOffsetTable().containsKey(topic + TOPIC_GROUP_SEPARATOR + group));

consumerOffsetManager.commitPullOffset("Pull", group, topic, 0, 100);
consumerOffsetManager.clearPullOffset(group, topic);
Assert.assertEquals(-1L, consumerOffsetManager.queryPullOffset(group, topic, 0));
}

@Test
Expand Down
Loading