- boolean applicable = snapshotOperation.isApplicable(modification,
- Optional.of(snapshotCapture.getMetadataTree()));
- LOG.debug("Store Transcation: {} : canCommit : {}", transaction.getIdentifier(), applicable);
+ Boolean applicable = false;
+ try {
+ snapshotOperation.checkApplicable(PUBLIC_ROOT_PATH, modification,
+ Optional.of(snapshotCapture.getRootNode()));
+ applicable = true;
+ } catch (DataPreconditionFailedException e) {
+ LOG.warn("Store Tx: {} Data Precondition failed for {}.",transaction.getIdentifier(),e.getPath(),e);
+ applicable = false;
+ }
+ LOG.debug("Store Transaction: {} : canCommit : {}", transaction.getIdentifier(), applicable);