Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Records not deleted after specified time on setting TTL for DDS

SA-107550

Summary



On setting the Time To Live (TTL) for a Decision DataSet (DDS) from the Specify Time to Live, records are not deleted after the specified time. This occurs for the offerPrecomputes dataset.


Error Messages



Not Applicable


Steps to Reproduce

  1. Execute a Strategy in a data flow. The Strategy results are sent to a DDS.
  2. Use a Dynamic System Setting (DSS) to set the Specify Time to Live (30 days).


Root Cause



A software use or operation error.
The TimeToLive (TTL) set from the application was 120 days instead of 30 days. The TTL for the records (not deleted) was still active. Hence, the records were not eligible for removal from the Cassandra table.



Resolution



Here’s the explanation for the reported behavior:

Use the below approach to identify the actual TTL value set for a record when it is inserted in to the C* table by the Pega application
  1. CQLSH Query to fetch the "TTL" remaining in seconds for a record

    Query Syntax: select ttl(data_), [key_column] from <keyspace>.<table> where [use only the exposed columns] limit 10 ALLOW FILTERING;

    TTL remaining time in days:  tl(data_) / 86400 = x days 

  2. CQLSH Query to fetch the WRITETIME (in microseconds) of a record into C* table

    Query Syntax: SELECT WRITETIME(data_) from <keyspace>.<table> where [use only the exposed columns];

  3. Convert the WRITETIME result into the Actual Date and Time

    Convert the query result from microseconds to milliseconds before converting the result to the Actual Date and Time.

    TTL elapsed time in days: Use the Days calculator to identify the Days Between Two Dates      

    Ensure to use the 'End Date' as the date when the 'CQLSH Query 1' above is run 

  4. Actual TTL value set from the application

    Actual TTL Value in days = "TTL remaining time in days" + "TTL elapsed time in days" = XY days which is the actual TTL value set for this record when it is inserted to the C* table from the Pega application.
Suggest Edit

Published July 11, 2020 - Updated December 2, 2021

Did you find this content helpful? Yes No

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us