From 216c6674ed494867ab8195e18fbc97a48d3ad680 Mon Sep 17 00:00:00 2001 From: Jonathan Boulle Date: Sun, 27 Dec 2015 21:13:58 +0100 Subject: [PATCH] docs: clarify CAS/CAD do not work on directories As noted in #4075. There are numerous style issues with this document but I don't want to go down that rabbit hole so this is an attempt at a minimally invasive clarification. --- Documentation/api.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/api.md b/Documentation/api.md index 08841ce66..422c3248f 100644 --- a/Documentation/api.md +++ b/Documentation/api.md @@ -500,6 +500,8 @@ etcd can be used as a centralized coordination service in a cluster, and `Compar This command will set the value of a key only if the client-provided conditions are equal to the current conditions. +_Note that `CompareAndSwap` does not work with [directories](#listing-a-directory). If an attempt is made to `CompareAndSwap` a directory, a 102 "Not a file" error will be returned._ + The current comparable conditions are: 1. `prevValue` - checks the previous value of the key. @@ -585,6 +587,8 @@ We successfully changed the value from "one" to "two" since we gave the correct This command will delete a key only if the client-provided conditions are equal to the current conditions. +_Note that `CompareAndDelete` does not work with [directories](#listing-a-directory). If an attempt is made to `CompareAndDelete` a directory, a 102 "Not a file" error will be returned._ + The current comparable conditions are: 1. `prevValue` - checks the previous value of the key.