-
Notifications
You must be signed in to change notification settings - Fork 7
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
Materialisation does not necessarily select the latest version if multiple versions exist within the same page #701
Comments
Hi @StijnDenisSirus name: client-pipeline
input:
name: Ldio:LdesClient
config:
materialisation.enabled: true
urls: https://ca-westtoer-ldes.bluesea-b3dcdb70.westeurope.azurecontainerapps.io/touristattractions/latestView?pageNumber=452
outputs:
- name: Ldio:ConsoleOut With this pipeline, two state objects passes through the pipeline:
|
Hi @jobulcke Thank you for looking into this. When using the simple client-pipeline you provided, I obtained the same results, with those exact state objects passing through the pipeline in the correct order (see lines 1384 and 3733 in the attached logs).
When looking at the differences between this simple client-pipeline and the actual pipeline we use in our application, my colleague and I discovered after some testing that the issue appears to be related to the keep-state property; more specifically the sqlite persistence strategy. When using the following client, I can replicate the original issue where multiple state objects pass through the pipeline and the last one shown in the logs has a generatedAtTime of "2024-10-16T09:47:34.6835981Z" - the version that is listed first on the page (See lines 1456, 1512, 3985, 7431, 7557 and finally 8770 in the attached logs for a keep-state sqlite run).
|
tl;dr Long answer In this version. and earlier on, it is possible to add a timestamp path in the ldes-client config, which orders the members according to the timestamp when the config property was provided. If left blank. the latest-state-filter would use the default value (http://www.w3.org/ns/prov#generatedAtTime), which is the timestamp path your ldes uses and why the filter works. Adding this property to the pipeline will resolve this issue, as the latest state on the same page will always be processed lastly. However, from version 2.10.0, the client fetches the timestamp-path and the version-of-path from the event stream by itself. This results in that the members are always ordered before being processed, which fixes this issue automatically, as here again the latest state on the same page will always be processed lastly. |
Describe the bug
When running an Ldio:LdesClient (ldes/ldi-orchestrator:2.9.0-SNAPSHOT) with materialisation enabled (all other materialisation properties set to default), the state object that is returned does not necessarily reflect the 'latest' version if multiple versions exist within the same page.
To Reproduce
Steps to reproduce the behavior:
The text was updated successfully, but these errors were encountered: