// Cluster files are always there
// Nothing has been written => no need to do anything
long amountOfFiles = countFiles(workingDirectory);
- if(!fullSave && amountOfFiles < 3) {
+ if(!fullSave && amountOfFiles == 0) {
// System.err.println("amountOfFiles < 3");
return false;
}
if (!safeToMakeSnapshot.get())
throw cause;
+ ClusterSetsSupport cssi = locator.getService(ClusterSetsSupport.class);
+ cssi.save();
+
persistHeadState();
-
+
if (fullSave)
mainState.save(dbFolder);
- ClusterSetsSupport cssi = locator.getService(ClusterSetsSupport.class);
- cssi.save();
-
amountOfFiles = countFiles(workingDirectory);
System.err.println(" -finished: amount of files is " + amountOfFiles);
else if (Type.Read == type)
throw new ValidationException("Illegal transaction type.");
// Note that even if we do cancel the cluster sets are not restored.
- try {
- session.getService(ClusterSetsSupport.class).save();
- } catch (Exception e) {
- e.printStackTrace();
- Logger.defaultLogError("Failed to save cluster sets.", e);
- }
graphSession.undoContext.cancelCommit();
endTransaction(true);
if (DEBUG)