Skip to content

Fix ArrayIndexOutOfBoundsException in PerformanceProducer. - #5786

Merged
jiazhai merged 1 commit into
apache:masterfrom
codelipenghui:issue-5760
Dec 7, 2019
Merged

jiazhai merged 1 commit into
apache:masterfrom
codelipenghui:issue-5760

Conversation

@codelipenghui

Copy link
Copy Markdown
Contributor

Fixes #5760

Motivation

We use org.HdrHistogram.Recorder to record write latency and highestTrackableValue is TimeUnit.SECONDS.toMicros(120000), but we record the value in micros, the error happens when the latency in micros is a very large number, so this PR change the highestTrackableValue of Recorder to TimeUnit.SECONDS.toMicros(120000)

Does this pull request potentially affect one of the following parts:

If yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API: (no)
  • The schema: (no)
  • The default values of configurations: (no)
  • The wire protocol: (no)
  • The rest endpoints: (no)
  • The admin cli options: (no)
  • Anything that affects deployment: (no)

Documentation

  • Does this pull request introduce a new feature? (no)

@codelipenghui codelipenghui self-assigned this Dec 2, 2019
@codelipenghui

Copy link
Copy Markdown
Contributor Author

run java8 tests


private static Recorder recorder = new Recorder(TimeUnit.SECONDS.toMillis(120000), 5);
private static Recorder cumulativeRecorder = new Recorder(TimeUnit.SECONDS.toMillis(120000), 5);
private static Recorder recorder = new Recorder(TimeUnit.SECONDS.toMicros(120000), 5);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we changing latency output in microseconds?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, the microseconds was recorded into recorder but output in mills. We can change the record value to mills or change the highestTrackableValue to microseconds. The latter is currently selected

@codelipenghui

Copy link
Copy Markdown
Contributor Author

run java8 tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IndexOutOfBoundsException in PerformanceProducer

4 participants