private void waitForSystemStabilization() {
        int retryCount = 100;
        int activeThreads = siddhiAppContext.getThreadBarrier().getActiveThreads();
        while (activeThreads != 0 && retryCount > 0) {
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                throw new SiddhiAppRuntimeException("Stabilization of Siddhi App " + siddhiAppContext.getName() +
                        " for snapshot/restore interrupted. " + e.getMessage(), e);
            }
            activeThreads = siddhiAppContext.getThreadBarrier().getActiveThreads();
            retryCount--;
        }
        if (retryCount == 0) {
            throw new SiddhiAppRuntimeException("Siddhi App " + siddhiAppContext.getName() +
                    " not stabilized for snapshot/restore, Active thread count is " +
                    activeThreads);
        }
    }
Clear all the revisions of persistence store of Siddhi App
modules/siddhi-core/src/main/java/io/siddhi/core/util/snapshot/SnapshotService.java