- writeTx.write(YangInstanceIdentifier.builder().build(), node);
-
- commitTransaction(writeTx);
+ writeTx.write(ROOT, node);
+ writeTx.ready();
+ try {
+ tree.validate(writeTx);
+ tree.commit(tree.prepare(writeTx));
+ } catch (DataValidationFailedException e) {
+ log.error("{}: Failed to validate recovery snapshot", shardName, e);
+ }