kunal642 commented on a change in pull request #2465: [CARBONDATA-2863] Refactored CarbonFile interface
URL:
https://github.com/apache/carbondata/pull/2465#discussion_r350853560
##########
File path: core/src/main/java/org/apache/carbondata/core/datastore/filesystem/AbstractDFSCarbonFile.java
##########
@@ -151,54 +149,47 @@ public String getPath() {
@Override
public long getSize() {
- return fileStatus.getLen();
+ try {
+ return fileSystem.getFileStatus(path).getLen();
Review comment:
fileStatus should not be a member variable because if the same carbonfile object is used to check for exists after the file is deleted by another client then the existing file status would return true instead of false.
There are many such methods in filestatus which can give false information
----------------------------------------------------------------
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:
[hidden email]
With regards,
Apache Git Services