Resolve "Remove superfluous RPC during remove"
This MR improves remove() performance by avoiding one RPC.
Before the change, the metadata of a path was fetched to check whether it is a directory or file. This is important because rmdir()
and unlink()
should not delete the wrong object. However, this meant that two RPCs were done per remove operation.
This update changes this behavior by checking the directory/file on the server during any remove operation. For this, an additional RPC field was added, which communicates whether the intent is to remove a directory. Overall, the semantics stay the same. The special case for rename()
still requires the metadata check beforehand and is unchanged.
IO500 has shown that this optimization doubles throughput for latency-sensitive operations, i.e., zero-byte files or small files.
Depends on !191 (merged)
Closes #293 (closed)