apache / accumulo

Apache Accumulo
https://accumulo.apache.org
Apache License 2.0
1.06k stars 445 forks source link

Fix bug with calculating remaining timeout in TabletServerBatchReaderIterator #4893

Closed DomGarguilo closed 6 days ago

DomGarguilo commented 2 weeks ago

Partially Fixes #4865

So far I have implemented the change suggested in #4865.

Some things I've noticed while working on this:

  1. It seems like this could be a good use for the CountDownTimer util object since we could just create the object with retryTimeout and use timeLeft() to get the remaining time. This would simplify this code and make things more intuitive. The only issue is CountDownTimer only exists in 3.1 and above. If others agree, I could backport it into 2.1 and use it here.
  2. Is it possible for the timeoutLeft value to be negative here? If so, what are the implications of that.