-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Ensure that most TableListener/MergedListener Notifications are processed while ensuring liveness; improve timeout handling in Table.awaitUpdate #6422
base: main
Are you sure you want to change the base?
Conversation
…ow run the actual notification processing work while guaranteeing that they remain live for the duration
… TimeSeriesFilters from previous validation rounds
…e don't report spurious double-notifies if a notification runs after destroy caused a prior notification to be skipped
8e7117b
to
f28e9e2
Compare
return false; | ||
} | ||
timeoutMillis -= TimeUnit.MILLISECONDS.convert(System.nanoTime() - startTime, TimeUnit.NANOSECONDS); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would check for timeoutMillis <= 0 and bail (or clamp it). I see no javadoc for the await call on Condition, but the standard wait call has the note:
In all respects, this method behaves as if wait(0L, 0) had been called. See the specification of the wait(long, int) method for details.
That has bit some of the Enterprise gRPC timeout handling in the past.
Which points out that if you have a zero argument, you are going to wait forever. I would prefer to have a check within the try to be very explicit about that edge case.
Back to draft/WIP, trying to expand the |
No description provided.