You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Kevin Risden (Jira)" <ji...@apache.org> on 2023/01/10 20:52:00 UTC
[jira] [Assigned] (SOLR-13243) Correct initial capacity of ops
[ https://issues.apache.org/jira/browse/SOLR-13243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin Risden reassigned SOLR-13243:
-----------------------------------
Assignee: Kevin Risden
> Correct initial capacity of ops
> -------------------------------
>
> Key: SOLR-13243
> URL: https://issues.apache.org/jira/browse/SOLR-13243
> Project: Solr
> Issue Type: Improvement
> Affects Versions: 7.7
> Reporter: hu xiaodong
> Assignee: Kevin Risden
> Priority: Trivial
> Fix For: main (10.0), 9.2
>
> Attachments: SOLR-13243.patch
>
> Time Spent: 50m
> 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: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org