HADOOP-19073 WASB: Fix connection leak in FolderRenamePending (#6534)
Contributed by xuyu
This commit is contained in:
parent
cab0f4c9ec
commit
cf9559eb27
@ -160,9 +160,12 @@ public class NativeAzureFileSystem extends FileSystem {
|
|||||||
|
|
||||||
// open redo file
|
// open redo file
|
||||||
Path f = redoFile;
|
Path f = redoFile;
|
||||||
FSDataInputStream input = fs.open(f);
|
int l;
|
||||||
byte[] bytes = new byte[MAX_RENAME_PENDING_FILE_SIZE];
|
byte[] bytes;
|
||||||
int l = input.read(bytes);
|
try (FSDataInputStream input = fs.open(f)) {
|
||||||
|
bytes = new byte[MAX_RENAME_PENDING_FILE_SIZE];
|
||||||
|
l = input.read(bytes);
|
||||||
|
}
|
||||||
if (l <= 0) {
|
if (l <= 0) {
|
||||||
// Jira HADOOP-12678 -Handle empty rename pending metadata file during
|
// Jira HADOOP-12678 -Handle empty rename pending metadata file during
|
||||||
// atomic rename in redo path. If during renamepending file is created
|
// atomic rename in redo path. If during renamepending file is created
|
||||||
|
Loading…
x
Reference in New Issue
Block a user