Skip to content
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

Added metrics in ShutdownTask for scenarios when parent leases are … #1080

Merged
merged 1 commit into from
Mar 21, 2023

Conversation

stair-aws
Copy link
Contributor

Issue #, if available:
N/A

Description of changes:
Added metrics in ShutdownTask for scenarios when parent leases are missing.

  • optimizations in ShutdownTask (e.g., Random static instance, eliminated over-used Function)
  • DRY+KISS on ShutdownTaskTest
  • deleted some dead code

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

…missing.

+ optimizations in `ShutdownTask` (e.g., `Random` static instance,
eliminated over-used Function)
+ DRY+KISS on `ShutdownTaskTest`
+ deleted some dead code
@stair-aws stair-aws added the v2.x Issues related to the 2.x version label Mar 21, 2023
/**
* @deprecated unused; to be removed in a "major" version bump
*/
@Deprecated
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we do this for bufferSize and recordsPublisher as well? Both those properties aren't in use either.

verify(shardRecordProcessor, never()).leaseLost(any(LeaseLostInput.class));
}

private Lease setupLease(final String leaseKey, final Collection<String> parentShardIds) throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: While creating new methods and the information is fresh, would recommend that method descriptions be added.

Copy link
Contributor

@pelaezryan pelaezryan left a comment

Choose a reason for hiding this comment

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

Comments aren't blockers to the PR. Will approve.

@stair-aws stair-aws merged commit 6be92dc into awslabs:master Mar 21, 2023
@stair-aws stair-aws deleted the shutdowntask-metrics branch March 21, 2023 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2.x Issues related to the 2.x version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants