Amrit Sarkar created SOLR-18589:
-----------------------------------

             Summary: Collection API lock is taken on the alias name when 
followAliases=true
                 Key: SOLR-18589
                 URL: https://issues.apache.org/jira/browse/SOLR-18589
             Project: Solr
          Issue Type: Bug
            Reporter: Amrit Sarkar


When a Collection API request names an alias and sets {{followAliases=true}}, 
the lock is taken on the alias name, not on the collection it resolves to. This 
happens in both the distributed and the Overseer modes:
* {{DistributedCollectionConfigSetCommandRunner}} locks on 
{{getCollectionName(message)}}
* {{OverseerCollectionMessageHandler.lockTask}} locks on 
{{getTaskKey(message)}}, i.e. {{collection}} or {{name}} from the message

So {{DELETE name=aliasA&followAliases=true}} and a concurrent {{ADDREPLICA 
collection=realColl}} hold different locks and can run at the same time on the 
same collection.

Expected: resolve the alias before taking the lock, so both requests serialize 
on the real collection.

Found while reviewing SOLR-17895 
([#5161|https://github.com/apache/solr/pull/5161]).



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to