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

Kinesis: fix maxBytesPerSecond throttling #298

Merged
merged 1 commit into from Dec 28, 2023

Conversation

jtjeferreira
Copy link
Contributor

The kinesis throttling is not being respected because the function getPayloadByteSize is incorrect.

private def getPayloadByteSize[T](record: (PutRecordsRequestEntry, T)): Int = record match {
    case (request, _) => request.partitionKey.length + request.data.asByteBuffer.position()
}

request.data.asByteBuffer.position() can return 0

The ticket was originally reported in akka/alpakka#2871 and I did the fix in the akka repository. AFAICT I can use the same code as long as I am the author...

@pjfanning pjfanning added this to the 1.0.2 milestone Dec 27, 2023
Copy link
Contributor

@pjfanning pjfanning left a comment

Choose a reason for hiding this comment

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

Lgtm - thanks

Copy link
Contributor

@mdedetrich mdedetrich left a comment

Choose a reason for hiding this comment

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

lgtm. If we wan't to be strict this should land in 1.1.0 since this is a behaviour change but afaict the current functionality appears to be broken so this can be an exception

@jtjeferreira Can you confirm?

@jtjeferreira
Copy link
Contributor Author

lgtm. If we wan't to be strict this should land in 1.1.0 since this is a behaviour change but afaict the current functionality appears to be broken so this can be an exception

@jtjeferreira Can you confirm?

yes the current functionality is broken

@pjfanning pjfanning merged commit c53ba21 into apache:main Dec 28, 2023
49 of 50 checks passed
@pjfanning
Copy link
Contributor

Merging - as it is a bug fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants