gapic-generator-java icon indicating copy to clipboard operation
gapic-generator-java copied to clipboard

BackgroundResourceAggregation's awaitTermination properly uses the Duration

Open lqiu96 opened this issue 2 years ago • 3 comments

Implement this TODO: https://github.com/googleapis/sdk-platform-java/blob/cc5724f04722e3d60eb9b4e02ecc1bdf5dd7a7fa/gax-java/gax/src/main/java/com/google/api/gax/core/BackgroundResourceAggregation.java#L78-L88

Implement subtracting time already used up from previous resources

lqiu96 avatar May 18 '23 15:05 lqiu96

As much as it should have been implemented as "aggregate time" before release, this behavior has existed for 6 years which is a long time for applications to have been written and based around the current "each resource gets X time" contract.

Consider the impact on existing, production code with 100 resources in the aggregation.

burkedavison avatar May 18 '23 20:05 burkedavison

Ah that's true. I was thinking that awaitTermination() is the last step and part of a fire-and-forget shutdown call at the end of each client's invocation. Would be a breaking change and should come as part of major version release

lqiu96 avatar May 18 '23 21:05 lqiu96