lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tomás Fernández Löbbe (JIRA) <>
Subject [jira] [Commented] (SOLR-11739) Solr can accept duplicated async IDs
Date Mon, 11 Dec 2017 18:59:01 GMT


Tomás Fernández Löbbe commented on SOLR-11739:

bq. Solr should assign the asyncIds and guarantee that they are unique
We now do something like this when async IDs are not provided, but *on the client side*. See
bq. It sounds like tomas is saying that there is existing code in solr that tries to reject
duplicate asyncIds
Yes, here:
bq. Solr should happily let you specify the same asyncId multiple times
hmm I'm not sure. I think the fact that Solr won't re-execute the same request twice makes
it much easier to write workflows that do collection operations. 
bq. isn't the amount of work / zk writes needed to generate a universally unique asyncId on
the server side essentially the same as the amount needed to tell the client that the asyncId
they specified isn't unique?
We now do a bunch of reads to check if the async IDs are in any of the current queues/maps
(see the code I linked above). I was considering either writing to some ZooKeeper path the
async ID  as part of a lock, before checking the existing queues and then deleting the lock,
or moving completely the async IDs to it's own path, and starting using this as the source
of truth of asyncIDs. The later would then make it easier to check if an async ID is currently
in use, however it's a much bigger change and we'll need to consider back compatibility

> Solr can accept duplicated async IDs
> ------------------------------------
>                 Key: SOLR-11739
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Tomás Fernández Löbbe
>            Assignee: Tomás Fernández Löbbe
>            Priority: Minor
>         Attachments: SOLR-11739.patch
> Solr is supposed to reject duplicated async IDs, however, if the repeated IDs are sent
fast enough, a race condition in Solr will let the repeated IDs through. The duplicated task
is ran and and then silently fails to report as completed because the same async ID is already
in the completed map. 

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message