You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/01/07 12:13:39 UTC

[GitHub] [hive] deniskuzZ commented on a change in pull request #1724: HIVE-24428: Concurrent add_partitions requests may lead to data loss

deniskuzZ commented on a change in pull request #1724:
URL: https://github.com/apache/hive/pull/1724#discussion_r553291067



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java
##########
@@ -774,6 +780,100 @@ private void checkFileFormats(Hive db, LoadTableDesc tbd, Table table)
     }
   }
 
+  class LocalTableLock  implements Closeable{
+
+    private Optional<HiveLockObject> lock;
+    private HiveLock lockObj;
+
+    public LocalTableLock(Optional<HiveLockObject> lock) throws LockException {

Review comment:
       I think, it would be more cleaner to have 0 and 1 argument constructors. Based on current usages of  LocalTableLock constructor you know for sure if lock if null or not.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org