Alluxio Fuse: only block getting size of incomplete file when fuse release() is called but not finished.

Description

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.
create()-write()flush()release()-getattr()

We should only wait from file to be completed in the second workflow and do not block waiting in the first workflow.

Environment

None

Status

Assignee

Lu Qiu

Reporter

Lu Qiu

Labels

None

Components

Fix versions

Affects versions

2.0.0

Priority

Major
Configure