cancel
Showing results for 
Search instead for 
Did you mean: 

Using log store in output window with Retention Policy

Former Member
0 Kudos

I have a flex which produces an Output Window. I have attached a log store to this output window.

The issue I am facing is when I do not give any explicit Retention Policy then the output window is able to fetch all the data from the log store on restart of the project. But when I explicitly set a Retention Policy then Window is not retaining the data from the disk (log store).

Here is how I am using Log Store in an output window.

CREATE LOG STORE LogStore

  PROPERTIES FILENAME = 'ExampleData.log' , MAXFILESIZE = 350 ;

CREATE FLEX FlexExampleManager

       IN FlexExampleInputStream

       OUT OUTPUT WINDOW FlexExampleOutputWindow

       SCHEMA (SYMBOL string, EVENT_TS bigdatetime)

       PRIMARY KEY (SYMBOL,EVENT_TS)

       STORE LogStore

       KEEP 8 HOURS PER (SYMBOL,EVENT_TS)

BEGIN

       DECLARE

       END;

ON FlexExampleInputStream {

       output setOpcode(FlexExampleInputStream, insert);

};

END;

If I comment the KEEP clause then it works as expected.

Accepted Solutions (1)

Accepted Solutions (1)

JWootton
Advisor
Advisor
0 Kudos

Are you restarting after more than 8 hours?  The KEEP policy uses the internal rowtime of each record.  So if you are restarting after more than 8 hours, all of the rows will have expired from your window.


If that's not it - then we'll need to probe a bit deeper, but that would seem like the most obvious cause of the behavior you are seeing.

Former Member
0 Kudos

No I was not restarting after 8 hours. For testing I kept the retention policy for 8 hours and then restarted the project within an hour.

While searching this issue online i found there was a known issue in SP04 regarding using retention policy on window with log store. I am not sure if this was fixed. We are using SP11.

674280

Avoid using retention with input windows that use a log store. While the compiler does not flag this as an error, the retention policy on input windows that use a log store may not work as expected after recovery.

Answers (0)