This is an automated email from the ASF dual-hosted git repository.
junrao pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push:
new 99d9e8f MINOR: update the comment for Utils.atomicMoveWithFallback
(#11641)
99d9e8f is described below
commit 99d9e8f7fc90f08b99bdf0ec8eefbbf1b6c356ee
Author: Chang <[email protected]>
AuthorDate: Wed Jan 5 17:03:50 2022 -0800
MINOR: update the comment for Utils.atomicMoveWithFallback (#11641)
Reviewers: Luke Chen <[email protected]>, Cong Ding <[email protected]>, Jun
Rao <[email protected]>
---
clients/src/main/java/org/apache/kafka/common/utils/Utils.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/clients/src/main/java/org/apache/kafka/common/utils/Utils.java
b/clients/src/main/java/org/apache/kafka/common/utils/Utils.java
index a04f5c5..0685d1d 100755
--- a/clients/src/main/java/org/apache/kafka/common/utils/Utils.java
+++ b/clients/src/main/java/org/apache/kafka/common/utils/Utils.java
@@ -912,7 +912,7 @@ public final class Utils {
* Attempts to move source to target atomically and falls back to a
non-atomic move if it fails.
* This function also flushes the parent directory to guarantee crash
consistency.
*
- * @throws IOException if both atomic and non-atomic moves fail
+ * @throws IOException if both atomic and non-atomic moves fail, or parent
dir flush fails.
*/
public static void atomicMoveWithFallback(Path source, Path target) throws
IOException {
atomicMoveWithFallback(source, target, true);
@@ -924,7 +924,8 @@ public final class Utils {
* when a sequence of atomicMoveWithFallback is called for the same
directory and we don't want
* to repeatedly flush the same parent directory.
*
- * @throws IOException if both atomic and non-atomic moves fail
+ * @throws IOException if both atomic and non-atomic moves fail,
+ * or parent dir flush fails if needFlushParentDir is true.
*/
public static void atomicMoveWithFallback(Path source, Path target,
boolean needFlushParentDir) throws IOException {
try {