Open tyndra opened 2 weeks ago
Hey @tyndra, thank you for reporting that issue 🌟
Data updates in OPAL are not guaranteed to be applied in a specific order on all OPAL Clients. The data update itself is a push triggering the OPAL Client to fetch the most up-to-date data from the Data Source at the time.
This way, the data source itself is the one guaranteeing the integrity of the data, as any time the OPAL Client access it, it is the most correct data, regardless of the order.
To further understand and investigate the case you've explained, I'll need to know your setup better. Can you please provide:
At best will be to create a minimally reproduceable example of the issue, docker-compose for the OPAL setup and a script to mimic the behavior.
Waiting to your info, thanks! 💎
OPAL Deployment:
Data sources:
A
) is configured for periodic updates every 5 minutes. B
) is used for inline updates.The errors are intermittent and are best reproduced with an automated test case that sends inline data updates for data source B
:
First, add an object to a path using PATCH add
:
{
"id": "af9e98f8-ca65-426c-8c7d-937a8f901a96",
"entries": [
{
"url": "some text",
"topics": [ "data_abc" ],
"dst_path": "/test_path",
"save_method": "PATCH",
"data": [
{
"op": "add",
"path": "myobj",
"value": {
"a": "1",
"b": "2"
}
}
]
}
]
}
Then it sends 10 consecutive updates with 200 milliseconds delay using PATCH replace
:
{
"id": "....",
"entries": [
{
"url": "some text",
"topics": [ "data_abc" ],
"dst_path": "/test_path",
"save_method": "PATCH",
"data": [
{
"op": "repalce",
"path": "myobj",
"value": {
"a": "101...",
"b": "201..."
}
}
]
}
]
}
GET
request.GET: [Client Instance IP-Address]/data/test_path/myobj
When inline updates for B
overlap with the periodic updates for the data source A
the instance does not persist the latest inline data in OPA’s memory even though the logs(above) show that OPAL-Client received the last data update request.
OPAL Version: 0.7.12
Observing some inline data updates being lost. Specifically, the last expected data update is not persisted even though I can see it is being processed in the logs. I believe it happens when the client also doing a periodic update (for a different topic) that takes a significant amount of time (http call takes several seconds) and returns about 5MB of data.
The logs below show the sequence of events as they are logged.
data_xyz
is a topic configured for periodic updates but also receives inline updates.data_abc
is a topic that is updated inline only and does not persist in the last value.data_abc
topic that is being lost