-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Different results on consecutive runs #436
Comments
Thanks for opening this bug report. That's not intended behavior and the only situation I'd expect different results is if the data was refreshed between requests. I tried out your query and can see two different addresses returned.
{
"entityID": "26211",
"addressID": "39766",
"address": "675 Third Avenue, 29th Floor",
"cityStateProvincePostalCode": "New York, NY 10017",
"country": "United States",
"addressRemarks": "",
"match": 0.476984126984127
} {
"entityID": "26213",
"addressID": "39771",
"address": "675 Third Avenue, 29th Floor",
"cityStateProvincePostalCode": "New York, NY 10017",
"country": "United States",
"addressRemarks": "",
"match": 0.476984126984127
} The problem seems to be that
Watchman will run multiple search operations concurrently to each other from each query. These results are sorted in a slice in a thread-safe manor, but due to the concurrent nature one address might be added before/after the other in an unpredictable way. |
This non-deterministic behavior could happen with other queries, but is rare. My first idea at solving this could be to sort based on another identifier (entityID, addressID, etc), but I assume that would confuse people while making search much more complex. |
Thanks for the explanation! Yeah, ordering the results by For now I will consider that these non-deterministic results can happen in rare cases. |
I'm not sure what overhead this would introduce, but we can investigate a bit. |
Watchman Version:
0.21.3
What were you trying to do?
Use the “Search SDNs” service from watchman.
What did you expect to see?
I expect that consecutive requests using the same parameters would return the same result.
What did you see?
The result is different on each run. For some parameters, the last address returned is changing on each run.
How can we reproduce the problem?
With the following search string:
The last address returned is either the address with
entityId 26211
or the address withentityId 26213
. The other addresses returned are always the same.Is this the expected behavior?
The text was updated successfully, but these errors were encountered: