Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

ahmedabu98
Copy link
Contributor

Fixes #33497 (see comment and comment for details)

Also updates tests

Copy link
Member

@kennknowles kennknowles left a comment

Choose a reason for hiding this comment

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

It may be worth doing more to signpost what is mutable and what is not. I'm not sure what that would look like. But this change is really subtle even though it is small. It is easy to imagine we have other issues and/or will have issues in the future.

routingPartitionKey.partition(getPartitionableRecord(record));

if (!writers.asMap().containsKey(partitionKey) && openWriters >= maxNumWriters) {
if (!writers.asMap().containsKey(routingPartitionKey) && openWriters >= maxNumWriters) {
Copy link
Member

Choose a reason for hiding this comment

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

nit: You aren't guaranteed that asMap is cheap. It could be linear time to convert from some other underlying data structure. It is better to call get and check if the result was null. (since this is not a LoadingCache you don't have to worry about accidentally creating too many entries)

(maybe think about it for future changes)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the tip, will do

Copy link
Contributor

github-actions bot commented Jan 9, 2025

Assigning reviewers. If you would like to opt out of this review, comment assign to next reviewer:

R: @damondouglas for label java.
R: @Abacn for label build.
R: @johnjcasey for label io.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

@ahmedabu98 ahmedabu98 merged commit d50cc15 into apache:master Jan 9, 2025
20 checks passed
ahmedabu98 added a commit to ahmedabu98/beam that referenced this pull request Jan 9, 2025
* fix and update tests

* dont mention df yet

* add PR link

* whitespace
ahmedabu98 added a commit to ahmedabu98/beam that referenced this pull request Jan 9, 2025
* fix and update tests

* dont mention df yet

* add PR link

* whitespace
kennknowles pushed a commit that referenced this pull request Jan 9, 2025
claudevdm pushed a commit to claudevdm/beam that referenced this pull request Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Managed IO for Iceberg cannot query by partition
2 participants