when we writes a file in Alluxio-Fuse, it triggers:
fuse apis: create() write() getAttr() write() flush() release()
When the file is not completed, getAttr() will block waiting for the file to be completed for 5 seconds. when we create 1000 small files, each wait 5 seconds will take 1 and a half hours.
We add the blocking because fuse release() is async (do not wait for the outputstream.close() task to return). In some workflow, we saw getattr() is called right after the release() is return. we want to wait for file to be completed and return the right file size in this getattr() call.
We should only wait from file to be completed in the second workflow and do not block waiting in the first workflow.