* Address KCLv3 issues reported on github
1. Fix transitive dependencies and add a maven plugin to catch these
at build time
2. Remove the redundant shutdown of the leaseCoordinatorThreadPool
3. Fix typo THROUGHOUT_PUT_KBPS
4. Fix shutdown sequence - make sure
scheduler shutdown without invoking run works
5. Fix backward compatibility check - Avoid flagging methods as deleted
if it is marked synchronized. Also mark interfaces introduced in KCLv3 as internal.
Dont fail the check for major release but print the output
for information/review purposes to know what API changes
have occurred in a major release
Manually tested the changes with some incompatible API changes
between patch release, minor release and major release.
* Set the source encoding in the pom.
This stops the following warning from being emitted in our logs:
```
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
```
* Replace deprecated systemProperties.
The recommended replacement is systemPropertyVariables, documented [here](https://maven.apache.org/surefire/maven-surefire-plugin/examples/system-properties.html).
* Deprecate ShutdownNotificationAware and update javadocs
ShutdownNotificationAware is not used by KCL, this PR
marks it as deprecated and updates the javadoc
Co-authored-by: nakulj <nklj@amazon.com>
* Replace generated code with source .proto files
This change replaces the generated Messages.java file with the source .proto files.
It also includes the pom.xml changes needed to install protoc from Maven Central, and use it to compile the wrapper java code.
* add explanatory comment
Follow up to #1332.
- Manually split up a long string literal.
- Disable ArrayTrailingComma, which checkstyle complains about even in
commented code. In any case it is redundant with PJF.
> Returning a lambda from a helper method or saving it in a constant is unnecessary; prefer to implement the functional interface method directly and use a method reference instead.
https://errorprone.info/bugpattern/UnnecessaryLambda
* Fix a race condition between ShardConsumer shutdown and initialization
When Kinesis shards have no data, there can be a race condition where
the shard-end record processing from RecordProcessorThread
interleaves with Scheduler performing initialization.
This leads to ShardConsumer making incorrect state transition
during initialization (moves from PROCESSING -> SHUTTING_DOWN) state
and during shutdown handling it moves from SHUTTING_DOWN -> SHUTDOWN_COMPLETE
without running the ShutdownTask.
This can cause the ShardConsumer to not perform proper shutdown
processing that is required for a child shard processing
to be unblocked. So the child shard could be blocked forever unless the
lease for the parent shard moves to a new worker and that worker does
not run into the race condition.
This patch fixes the race condition as follows:
The intializationComplete invocation is not needed after
needsInitialization has been set to false. Because initializationComplete
is mean to perform initialization in an async manner, but once
its done, the async task is a no-op in happy-path, but it can
perform incorrect state transition during a race condition.
* create script to check for backwards compatibility
* move scripts directory to .github folder
* add execute permissions to script
* moved the 'continue' call to the find_removed_methods() function
* add function to check if minor release is being performed
* Upgrade version to 2.6.0-SNAPSHOT
* modify ShutdownTask to call shutdownComplete for graceful shutdown
* add test to verify ShutdownTask succeeds regardless of shutdownNotification
* change access level for finalShutdownLatch to NONE
* remove unused variable in GracefulShutdownCoordinator
* make comment more concise
* move waitForFinalShutdown method into GracefulShutdownCoordinator class
* cleanup call method of GracefulShutdownCoordinator
* modify waitForFinalShutdown to throw InterruptedException