-
Notifications
You must be signed in to change notification settings - Fork 10
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
Search still returns previous versions of objects for a while after they have been updated #324
Comments
Could you provide your PUT body to modify the object? I've added two tests in #325 to attempt to reproduce the issue ( https://github.com/maykinmedia/objects-api/pull/325/files ) but this seems to work as expected on master. I'll double-check v2.1.1 |
In this example we modified the object from the Objects Api Admin interface. |
Investgated further after a hunch of Ivo, the PR seems to solve the problem (Joeri is having a look) |
Made a deep dive into this. The "problem" here is the data filter. The regular order of things goes like this:
Assuming we have an
Which record is valid on date
If you ask why did Anyway, now let's repeat the same query "Which record is valid on date
So, we probably need to adjust the rules:
If we now follow the rules the result would:
|
I decided to cut down on the magic (read: less complex rules to understand how it works over a slight functional change that can cause confusion - but is easily cleared up with documentation). Thus, the suggested change in the diff in the PR below should be the final approach (replace Th PR needs some work still because it changes CI stuff as well thats no longer needed I think. Due to its breaking change we need to make this part of the next major release (3.0.0) and not of 2.x |
We hit also this bug. Is there a time table when the related PR is being available in a version?? |
@flinden68 nop, but please explain your exact use case. If it concerns multiple record that were created on the same day, it might need to be a correction. |
We have an Object from Objects API where we update an property status to 'ingediend', but when do call for all these objects where the status is 'open', it contains also the object where we just updated the status to 'ingediend', and should be in the query results |
@flinden68 can you add all the records and your query to this issue? |
We do the query &data_attrs=identificatie__type__exact__bsn,identificatie__value__exact__xxxx,status__exact__open&ordering=-record__startAt. Records I could not provide at the moment. |
This ticket can be picked up further under Den Haag. I added "triage" because I want this investigated more. I also don't think this should be a major release anymore. It changes fuzzy behaviour to proper behaviour. |
@joeribekker When is this bug expected to be fixed? Also asking for Wendy van Duijvenvoorde |
Discussed with Anna:
This requires further discussion with @joeribekker after his holiday due to the impact |
* filter on date, * group records by object and keep records with max index * filter on rest of query params
We ran into an issue where, after we change a property, the previous version of the object still gets returned when searching for the old value of the property.
For example, we have an object with a nested property straat.
The object gets returned, as expected, with this query:
data_attrs=adres__straat__exact__Bospad
Now we change the straat to a new value. Version 2 of the object now exists with this new value.
When we search
data_attrs=adres__straat__exact__Dorpsstraat
it behaves as expected. Version 2 of the object is returned.However, when we search for the old value,
data_attrs=adres__straat__exact__Bospad
, version 1 is returned. But only for a few hours. When we try the same query the next daydata_attrs=adres__straat__exact__Bospad
no longer yields any results which is what we would have expected from the start.There seems to be some form of caching going on somewhere in the Objects Api. We have reproduced this on a number of environments running versions 2.1.0 (v2) and 2.1.1 (v2). There is no caching outside of the Objects Api in these environments.
The text was updated successfully, but these errors were encountered: