Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[irods#7918] replica_truncate: Fix JSON output for some cases
The replica_truncate API has a JSON-based message in its output string which is meant to communicate error information as well as information about the replica which was truncated or targeted for truncate. The API up to this point has only been communicating information back to clients in the failure cases. It is most useful to communicate the replica information to the client in the success cases. This change fixes that. This change also adjusts the JSON output from the case where the target replica is not in the hierarchy requested by the client via the RESC_NAME_KW. Before, this case would return the replica information for the replica which won the vote, but the JSON now returns no replica information because the replica which the client wanted to target either does not exist or is not accessible for truncating. Returning the replica information in this case is incorrect because showing the replica which did win the vote could give the impression that it was truncated when in fact it was not.
- Loading branch information