intel-cloud / cosbench

a benchmark tool for cloud object storage service
Other
573 stars 242 forks source link

fix bug: function errorStatisticsHandle and doAdd throw unexpected exception #396

Open liupengs opened 4 years ago

liupengs commented 4 years ago

three bug is fixed:

  1. unexpected exception cause cosbench throw StringIndexOutOfBoundsException:
2020-02-26 11:57:07,099 [ERROR] [AbstractAgent] - unexpected exception
java.lang.StringIndexOutOfBoundsException: String index out of range: 12
        at java.lang.String.substring(String.java:1963)
        at com.intel.cosbench.driver.operator.AbstractOperator.isUnauthorizedException(AbstractOperator.java:134)
        at com.intel.cosbench.driver.operator.Reader.doRead(Reader.java:102)
        at com.intel.cosbench.driver.operator.Reader.operate(Reader.java:69)
  1. time hopping cause cosbench throw ArrayIndexOutOfBoundsException:
2020-02-28 12:16:55,205 [ERROR] [AbstractAgent] - unexpected exception
java.lang.ArrayIndexOutOfBoundsException: -270
        at com.intel.cosbench.bench.Counter.doAdd(Counter.java:65)
        at com.intel.cosbench.driver.model.OperatorContext.doAddSample(OperatorContext.java:76)
        at com.intel.cosbench.driver.model.OperatorContext.addSample(OperatorContext.java:70)
  1. emtpy stack cause cosbench throw ArrayIndexOutOfBoundsException:
2020-02-28 23:27:57,462 [ERROR] [AbstractAgent] - unexpected exception
java.lang.ArrayIndexOutOfBoundsException: 0
        at com.intel.cosbench.driver.operator.AbstractOperator.errorStatisticsHandle(AbstractOperator.java:117)
        at com.intel.cosbench.driver.operator.Writer.doWrite(Writer.java:104)
        at com.intel.cosbench.driver.operator.Preparer.operate(Preparer.java:97)