Hi Antonio,
On Tue, Aug 12, 2014 at 2:55 PM, Antonio Jesus Navarro < ajnava...@stratio.com> wrote: > Hi all, > > Siddhi version 2.1.0-wso2v1 have new service called SnapshotService. I > think this service is used to recover the siddhi context from an unexpected > shutdown. The service have a method to generate a byte array with snapshot > data, and a method to restore this snapshot. > > Byte array generation works perfect. The byte array is generated with > all Snapshotable elements. But I think there are a bug into the restore > method. It iterates a snapshotable list of elements that in the first > instance are empty, and the byte array is never setted to siddhiContext. > > In restore() method, it lets all the snapshotables (windows, patterns etc) to restore themselves instead of setting it in SiddhiContext by calling restore() on all of them. All the required components such as windows, patterns that has a state implements this functionality. When you are using Siddhi as a library, when restoring you'll have to call siddhiManager.setPersistStore() with whatever store implementation you have and then call restoreLastRevision() to restore it to the previous state. Thanks Rajeev > I am misunderstanding something? Or it is a bug? > > Thanks in advance. > > > > _______________________________________________ > Architecture mailing list > Architecture@wso2.org > https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture > > -- Rajeev Sampath Senior Software Engineer WSO2, Inc.; http://www.wso2.com. Mobile: * +94716265766*
_______________________________________________ Architecture mailing list Architecture@wso2.org https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture