You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2023/01/10 20:52:00 UTC

[jira] [Commented] (SOLR-13243) Correct initial capacity of ops

    [ https://issues.apache.org/jira/browse/SOLR-13243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17656965#comment-17656965 ] 

ASF subversion and git services commented on SOLR-13243:
--------------------------------------------------------

Commit 953ac3531fadd5a8af76e074b9b35e4bf22c276e in solr's branch refs/heads/branch_9x from Haythem
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=953ac3531fa ]

SOLR-13243: Correct initial capacity of ops (#1232)



> 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