Skip to content

Commit 4d2c0ce

Browse files
committed
removed automerge
1 parent 4838f43 commit 4d2c0ce

File tree

2 files changed

+4
-24
lines changed

2 files changed

+4
-24
lines changed

src/org/opendedup/sdfs/io/MetaDataDedupFile.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -404,16 +404,11 @@ public static MetaDataDedupFile getFile(String path) throws IOException {
404404
} catch (IOException e) {
405405
SDFSLogger.getLog().warn(e);
406406
}
407-
} else if(!f.exists() && FileReplicationService.MetaFileExists(f.getPath().substring(pl))) {
408-
GetCloudFile cf = new GetCloudFile();
409-
cf.getResult(f.getPath().substring(pl),f.getPath().substring(pl));
410-
cf.downloadAll();
411-
}else if (!f.exists() || f.isDirectory()) {
407+
} else if (!f.exists() || f.isDirectory()) {
412408
mf = new MetaDataDedupFile(path);
413409
MetaFileStore.addToCache(mf);
414410
}
415411
else {
416-
417412
ObjectInputStream in = null;
418413
try {
419414
in = new ObjectInputStream(new FileInputStream(path));

src/org/opendedup/sdfs/mgmt/grpc/FileIOServiceImpl.java

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -460,20 +460,8 @@ private int getFtype(String path) throws FileIOError {
460460
String pt = mountedVolume + path;
461461
File _f = new File(pt);
462462

463-
try {
464-
if (!Files.exists(Paths.get(_f.getPath()), LinkOption.NOFOLLOW_LINKS)
465-
&& !FileReplicationService.MetaFileExists(path.trim())) {
466-
throw new FileIOError("path not found " + path, errorCodes.ENOENT);
467-
}
468-
if (!Files.exists(Paths.get(_f.getPath()), LinkOption.NOFOLLOW_LINKS)
469-
&& FileReplicationService.MetaFileExists(path.trim())) {
470-
GetCloudFile cf = new GetCloudFile();
471-
cf.getResult(path.trim(), path.trim());
472-
cf.downloadAll();
473-
}
474-
} catch (IOException e1) {
475-
SDFSLogger.getLog().error("unable to check file", e1);
476-
throw new FileIOError("path not found " + path, errorCodes.EIO);
463+
if (!Files.exists(Paths.get(_f.getPath()), LinkOption.NOFOLLOW_LINKS)) {
464+
throw new FileIOError("path not found " + path, errorCodes.ENOENT);
477465
}
478466
Path p = Paths.get(_f.getPath());
479467
try {
@@ -776,8 +764,6 @@ public void unlink(UnlinkRequest request, StreamObserver<UnlinkResponse> respons
776764
}
777765
}
778766

779-
780-
781767
@Override
782768
public void write(DataWriteRequest request, StreamObserver<DataWriteResponse> responseObserver) {
783769
DataWriteResponse.Builder b = DataWriteResponse.newBuilder();
@@ -925,7 +911,7 @@ public void mknod(MkNodRequest request, StreamObserver<MkNodResponse> responseOb
925911
try {
926912
this.getFtype(path);
927913
} catch (FileIOError e) {
928-
914+
929915
}
930916
File f = new File(FileIOServiceImpl.mountedVolume + path);
931917

@@ -1023,7 +1009,6 @@ public void open(FileOpenRequest request, StreamObserver<FileOpenResponse> respo
10231009
}
10241010
}
10251011
}
1026-
10271012

10281013
@Override
10291014
public void read(DataReadRequest request, StreamObserver<DataReadResponse> responseObserver) {

0 commit comments

Comments
 (0)