- @Override
- public void writeData(YangInstanceIdentifier path, NormalizedNode<?, ?> data) {
- LOG.debug("Tx {} writeData called path = {}", getIdentifier(), path);
- operationLimiter.release();
- }
-
- @Override
- public void readData(final YangInstanceIdentifier path, SettableFuture<Optional<NormalizedNode<?, ?>>> proxyFuture) {
- LOG.debug("Tx {} readData called path = {}", getIdentifier(), path);
- operationLimiter.release();
- proxyFuture.setException(new ReadFailedException("Error reading data for path " + path, failure));
- }
-
- @Override
- public void dataExists(YangInstanceIdentifier path, SettableFuture<Boolean> proxyFuture) {
- LOG.debug("Tx {} dataExists called path = {}", getIdentifier(), path);
- operationLimiter.release();
- proxyFuture.setException(new ReadFailedException("Error checking exists for path " + path, failure));
+ final Throwable t;
+ if (failure instanceof NoShardLeaderException) {
+ t = new DataStoreUnavailableException(failure.getMessage(), failure);
+ } else {
+ t = failure;
+ }
+ proxyFuture.setException(new ReadFailedException("Error executeRead " + readCmd.getClass().getSimpleName()
+ + " for path " + readCmd.getPath(), t));