Data Recovery

A log store allows data recovery inside a window if a server fails or is shut down.

Log stores provide data recovery for a window. Properly specified log stores recover windows elements on failure, and make sure that data gets restored correctly if the server fails and restarts. You can use log stores with windows that have no retention policy; you cannot use log stores with stateless elements.

When using log stores:
Note: If a memory store window receives data from a log store window via a stateless element, for example, a delta stream or a stream, its contents are not restored during server recovery.
Log stores are periodically compacted, at which point all data accumulated in the store is checkpointed and multiple operations on the same key are collapsed. After a checkpoint, the store continues appending incoming data rows to the end of the store until the next checkpoint.
Note: The recovery of data written to the store, but not yet checkpointed, is available for input windows only. Sybase recommends that when you assign a window to a log store, you also assign all of its input windows to a log store. Otherwise, data written to the window after the last checkpoint is not restored.

Unlike memory stores, log stores do not extend automatically. Use the CCL maxfilesize property to specify log store size. The size of a log store is extremely important. Log stores that are too small can cause processing to stop due to overflow. They can also cause significant performance degradation due to frequent cleaning cycles. A log store that is too large can hinder performance due to larger disk and memory requirements.

Related concepts
Stores
Retention
Related reference
CREATE MEMORY STORE Statement
CREATE LOG STORE Statement
KEEP Clause