Skip to content

SOLR-15446: Fix three off-by-one ArrayList initialCapacity choices when calling ZooKeeper.multi API.#156

Merged
risdenk merged 3 commits intoapache:mainfrom
cpoerschke:SOLR-15446
Mar 24, 2023
Merged

SOLR-15446: Fix three off-by-one ArrayList initialCapacity choices when calling ZooKeeper.multi API.#156
risdenk merged 3 commits intoapache:mainfrom
cpoerschke:SOLR-15446

Conversation

@cpoerschke
Copy link
Contributor

https://issues.apache.org/jira/browse/SOLR-15446 created but no solr/CHANGES.txt entry planned for this small change.

@HoustonPutman
Copy link
Contributor

Not directly related to the PR, but is there a reason for using ZooKeeper.multi when only issuing 1 command?

@cpoerschke
Copy link
Contributor Author

Not directly related to the PR, but is there a reason for using ZooKeeper.multi when only issuing 1 command?

Interesting question! From a quick look at the ZooKeeper docs I could see no reasons for preferring multi over the single command equivalent.

@risdenk
Copy link
Contributor

risdenk commented Oct 27, 2022

looks like this just needs to be brought up to main

@risdenk
Copy link
Contributor

risdenk commented Oct 27, 2022

Another idea might be List.of() which would avoid having to even keep track of the initial capacity at all?

@risdenk
Copy link
Contributor

risdenk commented Jan 10, 2023

FWIW PR #1232 addressed a part of this. I'll resolve the conflict and use List.of since that makes it so we don't even need to deal w/ sizes.

@risdenk risdenk self-requested a review January 10, 2023 21:01
@risdenk risdenk merged commit 07286c0 into apache:main Mar 24, 2023
risdenk added a commit that referenced this pull request Mar 24, 2023
…en calling ZooKeeper.multi API. (#156)

Co-authored-by: Kevin Risden <krisden@apache.org>
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.

3 participants