RTI Connext C API Version 7.4.0
DDS_PersistentStorageSettings Struct Reference

Configures durable writer history and durable reader state. More...

Data Fields

DDS_Boolean enable
 <<extension>> Enables durable writer history in a DDS_DataWriter and durable reader state in a DDS_DataReader. More...
 
char * file_name
 <<extension>> The file name where the durable writer history or durable reader state will be stored. More...
 
char * trace_file_name
 <<extension>> The file name where to store the SQL statements executed when loading and storing the durable writer history or durable reader state. More...
 
DDS_PersistentJournalKind journal_kind
 <<extension>> Sets the journal mode of the persistent storage. More...
 
DDS_PersistentSynchronizationKind synchronization_kind
 <<extension>> Sets the level of synchronization with the physical disk. More...
 
DDS_Boolean vacuum
 <<extension>> Sets the auto-vacuum status of the storage. More...
 
DDS_Boolean restore
 <<extension>> Indicates if the persisted writer history or reader state must be restored. More...
 
struct DDS_AllocationSettings_t writer_instance_cache_allocation
 <<extension>> Configures the resource limits associated with the instance durable writer history cache. More...
 
struct DDS_AllocationSettings_t writer_sample_cache_allocation
 <<extension>> Configures the resource limits associated with the sample durable writer history cache. More...
 
DDS_Boolean writer_memory_state
 <<extension>> Determines how much state will be kept in memory by the durable writer history in order to avoid accessing the persistent storage in disk. More...
 
DDS_UnsignedLong reader_checkpoint_frequency
 <<extension>> Controls how often the reader state is stored into the database. More...
 

Detailed Description

Configures durable writer history and durable reader state.

In a DDS_DataWriter, this structure configures durable writer history. This feature allows a DataWriter to persist its historical cache, so that it can survive shutdowns, crashes, and restarts. When an application restarts, each DataWriter that has been configured to have durable writer history automatically loads all of the data in this cache from disk and can carry on sending data as if it had never stopped executing.

In a DDS_DataReader, this structure configures durable reader state. This feature allows a DataReader to persist its state and remember which data it has already received. When an application restarts, each DataReader that has been configured to have durable reader state automatically loads its state from disk and can carry on receiving data as if it had never stopped executing. Data that had already been received by the DataReader before the restart will be suppressed so that it is not even sent over the network.

RTI Connext uses SQLite to store the durable writer history and durable reader state.

QoS:
DDS_DurabilityQosPolicy

Field Documentation

◆ enable

DDS_Boolean DDS_PersistentStorageSettings::enable

<<extension>> Enables durable writer history in a DDS_DataWriter and durable reader state in a DDS_DataReader.

When this field is set to DDS_BOOLEAN_TRUE, the persistent storage configuration using this structure will take precedence over the configuration using the deprecated dds.data_writer.history.odbc_plugin.builtin.* and dds.data_reader.state.* properties.

[default] DDS_BOOLEAN_FALSE

Categories
Immutable, Durability

◆ file_name

char* DDS_PersistentStorageSettings::file_name

<<extension>> The file name where the durable writer history or durable reader state will be stored.

Setting this field to a value other than NULL is mandatory when enabling durable writer history or durable reader state.

If the file does not exist, it will be created.

If the file exists and DDS_PersistentStorageSettings::restore is set to DDS_BOOLEAN_TRUE, the durable writer history or durable reader state will be restored from the file. Otherwise, the file will be overwritten.

Important: When the file exists, the fields DDS_DataReaderProtocolQosPolicy::virtual_guid and DDS_DataWriterProtocolQosPolicy::virtual_guid will be set by RTI Connext based on the file content. If you change these fields, the value will be ignored.

RTI Connext uses SQLite to store the durable writer history and durable reader state.

[default] NULL

Categories
Immutable, Durability

◆ trace_file_name

char* DDS_PersistentStorageSettings::trace_file_name

<<extension>> The file name where to store the SQL statements executed when loading and storing the durable writer history or durable reader state.

Setting this field to a value other than NULL will enable tracing of the SQL statements executed when loading and storing the durable writer history or durable reader state.

Important: Enabling tracing will have a negative impact on performance. Use this feature only for debugging purposes.

[default] NULL

Categories
Immutable, Durability

◆ journal_kind

DDS_PersistentJournalKind DDS_PersistentStorageSettings::journal_kind

<<extension>> Sets the journal mode of the persistent storage.

[default] DDS_WAL_PERSISTENT_JOURNAL

Categories
Immutable, Durability

◆ synchronization_kind

DDS_PersistentSynchronizationKind DDS_PersistentStorageSettings::synchronization_kind

<<extension>> Sets the level of synchronization with the physical disk.

[default] DDS_NORMAL_PERSISTENT_SYNCHRONIZATION

Categories
Immutable, Durability

◆ vacuum

DDS_Boolean DDS_PersistentStorageSettings::vacuum

<<extension>> Sets the auto-vacuum status of the storage.

When auto-vacuum is DDS_BOOLEAN_TRUE, the storage files will be compacted automatically with every transaction.

When auto-vacuum is DDS_BOOLEAN_FALSE, after data is deleted from the storage files, the files remain the same size.

[default] DDS_BOOLEAN_TRUE

Categories
Immutable, Durability

◆ restore

DDS_Boolean DDS_PersistentStorageSettings::restore

<<extension>> Indicates if the persisted writer history or reader state must be restored.

For a DDS_DataWriter, this field indicates whether or not the persisted writer history must be restored once the DataWriter is restarted.

For a DDS_DataReader, this field indicates whether or not the persisted reader state must be restored once the DataReader is restarted.

[default] DDS_BOOLEAN_TRUE

Categories
Immutable, Durability

◆ writer_instance_cache_allocation

struct DDS_AllocationSettings_t DDS_PersistentStorageSettings::writer_instance_cache_allocation

<<extension>> Configures the resource limits associated with the instance durable writer history cache.

This field only applies to DDS_DataWriter entities.

To minimize the number of accesses to the persisted storage, RTI Connext uses an instance cache.

Do not confuse this limit with the initial and maximum number of instances that can be maintained by a DataWriter in persistent storage. These resource limits are configured using DDS_ResourceLimitsQosPolicy::max_instances and DDS_ResourceLimitsQosPolicy::initial_instances.

If DDS_PersistentStorageSettings::writer_memory_state is set to DDS_BOOLEAN_TRUE, then the value of DDS_AllocationSettings_t::max_count is set to DDS_LENGTH_UNLIMITED, overwriting any value set by the user.

DDS_AllocationSettings_t::incremental_count is ignored.

[range] DDS_AllocationSettings_t::max_count in interval [1, INT_MAX], DDS_LENGTH_AUTO, or DDS_LENGTH_UNLIMITED. DDS_AllocationSettings_t::initial_count in interval [1, INT_MAX], or DDS_LENGTH_AUTO.

DDS_LENGTH_AUTO means that the value will be set to the equivalent value of DDS_ResourceLimitsQosPolicy.

[default] DDS_AllocationSettings_t::max_count = DDS_LENGTH_AUTO (= DDS_ResourceLimitsQosPolicy::max_instances) and DDS_AllocationSettings_t::initial_count = DDS_LENGTH_AUTO (= DDS_ResourceLimitsQosPolicy::initial_instances).

Categories
Immutable, Durability, Sample Memory Management

◆ writer_sample_cache_allocation

struct DDS_AllocationSettings_t DDS_PersistentStorageSettings::writer_sample_cache_allocation

<<extension>> Configures the resource limits associated with the sample durable writer history cache.

This field only applies to DDS_DataWriter entities.

To minimize the number of accesses to the persisted storage, RTI Connext uses a sample cache.

Do not confuse this limit with the initial and maximum number of samples that can be maintained by a DataWriter in persistent storage. These resource limits are configured using DDS_ResourceLimitsQosPolicy::max_samples and DDS_ResourceLimitsQosPolicy::initial_samples.

DDS_AllocationSettings_t::incremental_count is ignored.

[range] DDS_AllocationSettings_t::max_count in interval [1, INT_MAX], DDS_LENGTH_AUTO, or DDS_LENGTH_UNLIMITED. DDS_AllocationSettings_t::initial_count in interval [1, INT_MAX], or DDS_LENGTH_AUTO.

DDS_LENGTH_AUTO means that the value will be set to the equivalent value of DDS_ResourceLimitsQosPolicy.

[default] DDS_AllocationSettings_t::max_count = 32 and DDS_AllocationSettings_t::initial_count = 32.

Categories
Immutable, Durability, Sample Memory Management

◆ writer_memory_state

DDS_Boolean DDS_PersistentStorageSettings::writer_memory_state

<<extension>> Determines how much state will be kept in memory by the durable writer history in order to avoid accessing the persistent storage in disk.

This field only applies to DDS_DataWriter entities.

If this field is set to DDS_BOOLEAN_TRUE, then DDS_AllocationSettings_t::max_count in DDS_PersistentStorageSettings::writer_instance_cache_allocation is set to DDS_LENGTH_UNLIMITED, overwriting any value set by the user.

In addition, the durable writer history will keep a fixed state overhead per sample in memory. This mode provides the best durable writer history performance. However, the restore operation will be slower, and the maximum number of samples that the durable writer history can manage is limited by the available physical memory.

If this field is set to DDS_BOOLEAN_FALSE, all the state will be kept in the underlying database. In this mode, the maximum number of samples in the durable writer history is not limited by the physical memory available.

This field is always set to DDS_BOOLEAN_FALSE when the DataWriter is configured with DDS_ReliabilityQosPolicy::acknowledgment_kind set to DDS_APPLICATION_AUTO_ACKNOWLEDGMENT_MODE or DDS_APPLICATION_EXPLICIT_ACKNOWLEDGMENT_MODE, or DDS_AvailabilityQosPolicy::enable_required_subscriptions is set to DDS_BOOLEAN_TRUE.

[default] DDS_BOOLEAN_TRUE

Categories
Immutable, Durability, Middleware Memory Management

◆ reader_checkpoint_frequency

DDS_UnsignedLong DDS_PersistentStorageSettings::reader_checkpoint_frequency

<<extension>> Controls how often the reader state is stored into the database.

This field only applies to DDS_DataReader entities.

A value of N means store the state once every N received and processed samples.

The circumstances under which a data sample is considered "processed by the application" depends on the DataReader configuration.

For additional information on when a sample is considered "processed by the application" see Durable Reader State, in the Core Libraries User's Manual.

A high value will provide better performance. However, if the DataReader is restarted it may receive some duplicate samples.

[range] [1, 1000000] [default] 1

Categories
Immutable, Durability