[
https://issues.apache.org/jira/browse/SOLR-13243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kevin Risden updated SOLR-13243:
--------------------------------
Status: Patch Available (was: Open)
> wrong initialization size of Arraylist
> --------------------------------------
>
> Key: SOLR-13243
> URL: https://issues.apache.org/jira/browse/SOLR-13243
> Project: Solr
> Issue Type: Improvement
> Affects Versions: 7.7
> Reporter: hu xiaodong
> Priority: Trivial
> Attachments: SOLR-13243.patch
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> ElectionContext.java
> {code:java}
> @Override
> void runLeaderProcess(boolean weAreReplacement, int pauseBeforeStartMs)
> throws KeeperException, InterruptedException, IOException {
> String parent = new Path(leaderPath).getParent().toString();
> try {
> RetryUtil.retryOnThrowable(NodeExistsException.class, 60000, 5000, () -> {
> synchronized (lock) {
> ........
> List<Op> ops = new ArrayList<>(2); //HERE SHOULD BE 3 OR MORE
> ops.add(Op.check(leaderSeqPath, -1));
> ops.add(Op.create(leaderPath, Utils.toJSON(leaderProps),
> zkClient.getZkACLProvider().getACLsToAdd(leaderPath), CreateMode.EPHEMERAL));
> ops.add(Op.setData(parent, null, -1));
> List<OpResult> results;
> results = zkClient.multi(ops, true);
> .......
> }
> {code}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]