Copilot commented on code in PR #8905:
URL: https://github.com/apache/hbase/pull/8905#discussion_r4633830205


##########
hbase-diagnostics/src/main/java/org/apache/hadoop/hbase/wal/WALPerformanceEvaluation.java:
##########
@@ -233,6 +233,9 @@ public int run(String[] args) throws Exception {
         } else if (cmd.equals("-traceFreq")) {
           // keep it here for compatible
           System.err.println("-traceFreq is not supported any more");
+          if (i + 1 < args.length && !args[i + 1].startsWith("-")) {
+            i++;
+          }

Review Comment:
   `-traceFreq` is documented with a required `<N>` and the PR description says 
options without values should print usage, but this guard accepts a trailing 
`-traceFreq` and proceeds with the benchmark because it never advances or 
errors when no argument remains. Treat the absence of a following value (and a 
following option token) as a missing value before consuming it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to