This is an automated email from the ASF dual-hosted git repository.
lizhanhui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git
The following commit(s) were added to refs/heads/develop by this push:
new fdd77d1a0 [ISSUE #5562]Reset consumeOffset execution logic In a catch
block,and is not executed under normal circumstances (#5563)
fdd77d1a0 is described below
commit fdd77d1a0bf7ab5b4fd49726f7841c4363174ea7
Author: zhangjidi2016 <[email protected]>
AuthorDate: Thu Nov 24 09:56:58 2022 +0800
[ISSUE #5562]Reset consumeOffset execution logic In a catch block,and is
not executed under normal circumstances (#5563)
Co-authored-by: zhangjidi <[email protected]>
---
.../tools/command/offset/ResetOffsetByTimeOldCommand.java | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git
a/tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeOldCommand.java
b/tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeOldCommand.java
index ec99ec89b..7984bb8c3 100644
---
a/tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeOldCommand.java
+++
b/tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeOldCommand.java
@@ -116,15 +116,14 @@ public class ResetOffsetByTimeOldCommand implements
SubCommand {
System.out.printf("specified timestamp invalid.%n");
return;
}
+ }
- boolean force = true;
- if (commandLine.hasOption('f')) {
- force =
Boolean.parseBoolean(commandLine.getOptionValue("f").trim());
- }
-
- defaultMQAdminExt.start();
- resetOffset(defaultMQAdminExt, consumerGroup, topic,
timestamp, force, timeStampStr);
+ boolean force = true;
+ if (commandLine.hasOption('f')) {
+ force =
Boolean.parseBoolean(commandLine.getOptionValue("f").trim());
}
+ defaultMQAdminExt.start();
+ resetOffset(defaultMQAdminExt, consumerGroup, topic, timestamp,
force, timeStampStr);
} catch (Exception e) {
throw new SubCommandException(this.getClass().getSimpleName() + "
command failed", e);