Persistence Service dispose on closing

7 posts / 0 new
Last post
Offline
Last seen: 6 years 9 months ago
Joined: 04/28/2013
Posts: 38
Persistence Service dispose on closing

I've encountered the following problem with the persistence service, upon closing the service, dispose messages are being sent for all instances. That seems a bit weird, as I set autodispose_unregistered_instances to false for PRSTDataWriter qos. Is it possible that PRSTDataWriter behaves differently than other datawriters, or somehow the dispose is not sent from PRSTDataWriter (propagate_dispose is set to true in persistence_group, so maybe it somehow involves PRSTDataReader?) . Any help would be appreciated.

Thanks, 

Michael

rose's picture
Offline
Last seen: 3 years 3 months ago
Joined: 08/22/2011
Posts: 148

Hello Michael, 

You're seeing this behavior because the default QoS for DataWriters is set to automatically send a dispose message when instances are unregistered.  When a DataWriter is deleted (any DataWriter, including the ones in the Persistence Service), it unregisters all the instances it has written.  You can change this behavior by changing the QoS setting in the Persistence Service QoS.

The QoS is here: WriterDataLifecycleQos

Thank you!

Rose

rose's picture
Offline
Last seen: 3 years 3 months ago
Joined: 08/22/2011
Posts: 148

Hello Michael, 

I just noticed that I misread your posting, and that you are already changing the WriterDataLifecycleQos.  We are looking into why this could happen.

Thank you!

Rose

Offline
Last seen: 6 years 9 months ago
Joined: 04/28/2013
Posts: 38

Hey Rose,

Turns out the reader is removing the data on NOT_ALIVE_NO_WRITERS. I tried setting DataReader liveliness setting to default (infinite) but I still see the data being removed after about 1 minute which, I assume, is the result of discovery process not finding any writers.

Is there an option to make the reader as persistent as possible, thus retaining the data even if there are no writers and the persistence service is not running?

(Sorry for the mislead)

Thanks,

Michael

rose's picture
Offline
Last seen: 3 years 3 months ago
Joined: 08/22/2011
Posts: 148

Hello Michael, 

What is your DataReader's history QoS set to?  What are the DataReader's resource limits?

The DataReader will always get a notification if there are no more DataWriters that are writing an instance.  My guess is that discovery is being lost after 100 seconds, and when discovery is lost, the DataWriter is marked as no longer alive. 

The instance state change notification will be stored in the same queue as the data samples.  If you have history = KEEP_LAST, depth = 1, this notification that the instance has changed state to NOT_ALIVE_NO_WRITERS will overwrite the last data update.  If you change to have history depth = 2, and the previous data sample will not be overwritten by this notification.

Thank you!

Rose

Offline
Last seen: 6 years 9 months ago
Joined: 04/28/2013
Posts: 38

That seems to be the case, 

Thanks a lot for the help, Rose

Michael 

 

rose's picture
Offline
Last seen: 3 years 3 months ago
Joined: 08/22/2011
Posts: 148

You are welcome!  I'm glad that solved the problem!

Rose