Remove skip ignorable shards#13221
Merged
AmatyaAvadhanula merged 7 commits intoapache:masterfrom Oct 28, 2022
Merged
Conversation
Comment on lines
808
to
821
| final Set<String> retVal = new TreeSet<>(); | ||
| ListShardsRequest request = new ListShardsRequest().withStreamName(stream); | ||
| while (true) { | ||
| ListShardsResult result = kinesis.listShards(request); | ||
| retVal.addAll(result.getShards() | ||
| .stream() | ||
| .map(Shard::getShardId) | ||
| .collect(Collectors.toList()) | ||
| ); | ||
| String nextToken = result.getNextToken(); | ||
| if (nextToken == null) { | ||
| return retVal; | ||
| } | ||
| request = new ListShardsRequest().withNextToken(nextToken); |
Contributor
There was a problem hiding this comment.
what is the difference between this and getShardsUsingListShards?
Contributor
Author
There was a problem hiding this comment.
Thanks for pointing it out. This is an error and would always use listShards to get partition Ids
…ipIgnorableShards
…ipIgnorableShards
…ipIgnorableShards
abhishekagarwal87
approved these changes
Oct 28, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
It's possible in kinesis ingestion for closed and empty shards to be considered during assignment of shards to tasks. This could potentially lead to a skew in the data processed by workers. since some tasks may have more closed and empty shards in their assignment. #12235 was raised to solve this by adding a flag skipIgnorableShards . When this flag is set, supervisor would try to exclude such useless (aka ignorable) shards from assignment. However, after more careful analysis, it turns out that the flag is not really needed due to the following reasons:
For tips about how to write a good release note, see Release notes.
This PR has: