Support Article
PRFile instantiates to folder for file SPEC - S3 Fi
SA-40276
Summary
Whenever new PRFile is invoked, a folder is created.
When PROutputStream is created with that PRFile the actual xml file is created with data.
So every file created is accompanied by an empty folder with same name.
Error Messages
Not Applicable
Steps to Reproduce
Observe the folders created for each file which we write to S3 using PRFile API.
Root Cause
Issue was in FileS3Adapter.getParent().
Bug would occur when writing an OutputStream to a newly-created PRFile. The constructor(s) for the class PROutputStream have the following logic:
aFile.getParentFile().mkdirs();
mOutputStream = getOutputStream(aFile,aAppend);
In other words, it would get the parent folder(s) of the file you are writing to and would create any necessary missing directories, if needed, before actually getting an output stream to the file.
"aFile.getParentFile()" returns the actual parent of the current file. Unfortunately, FileS3Adapter.getParent() didn't.
Resolution
Apply HFix-35329.
Additional Installation Instructions:
Once the hotfix is installed all the nodes in the cluster need to be restarted with appropriate system settings/DSS set to turn the feature on.
Once the hotfix is installed all the nodes in the cluster need to be restarted with appropriate system settings/DSS set to turn the feature on.
Published November 8, 2017 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.