Persistence Service Isn't Overwriting Stale Data

1 post / 0 new
Offline
Last seen: 6 years 2 months ago
Joined: 01/03/2018
Posts: 14
Persistence Service Isn't Overwriting Stale Data

For my qos I am using Transient durability and am noticing some undesired behavior that I wouldn't have expected. I am sending keyed samples and I have my resource limits for my reader configured with max_samples_per_instance=1, max_instances=200, max_samples=200. For my writer I use the durability_service with the same settings. I have my persistence service configured with use_durability_service set to 1.

My scenario involves sending 400 instances from my writer prior to any reader joining. I'm expecting the persistence service to only ever store up to 200 instances which is occurring as expected. However, I'm also expecting the persistence service to always store the latest data that is sent to it. What is happening instead is that the second 200 messages are all being dropped by the persistence service. When my late joining reader comes up, it only gets the first 200 messages.

Once the persistence service runs out of memory or hits its resource limits, I'd prefer it to overwrite the old data with the new data. Instead, what I'm seeing is that the persistence service is rejecting the new data while holding onto the old data. Is there a way to have the persistence service store the data as a circular buffer (in the same way that the send queue stores data)?