hudi-agent commented on code in PR #19486:
URL: https://github.com/apache/hudi/pull/19486#discussion_r3703317991
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/transaction/lock/FileSystemBasedLockProvider.java:
##########
@@ -63,14 +63,30 @@
@Slf4j
public class FileSystemBasedLockProvider implements LockProvider<String>,
Serializable {
private static final String LOCK_FILE_NAME = "lock";
+ /**
+ * Guards this provider's lock-file operations.
+ *
+ * <p>These blocks used to synchronize on {@link #LOCK_FILE_NAME}. That is a
compile-time String
+ * constant, so it is interned and shared JVM-wide with every other {@code
"lock"} literal - including
+ * {@code FileSystemBasedLockProviderTestClass}, which declares its own
{@code static final String LOCK =
Review Comment:
🤖 nit: referencing a test class by name in production Javadoc is a bit
fragile — if `FileSystemBasedLockProviderTestClass` is ever renamed, this
comment silently goes stale. Could you drop the specific class name and just
say something like "any class in the same JVM that interns the same `\"lock\"`
literal contends on the very same monitor"?
<sub><i>⚠️ AI-generated; verify before applying. React 👍/👎 to flag
quality.</i></sub>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]