Create TTL may be used for many load operations

Description

https://github.com/Alluxio/alluxio/pull/7317 adds support for configuring a TTL to use for loading and another TTL to use for creating. The implementation does this by using the USER_FILE_LOAD_TTL property for getStatus and listStatus, and USER_FILE_CREATE_TTL for other RPCs. However, this doesn't interact well with UFS sync because any RPC could trigger files to be loaded from UFS, but only getStatus/listStatus tell the master what TTL to use for loaded files.

For example, suppose I set the load TTL to (1 minute, FREE) and the create TTL to (1 hour, DELETE), and my directory structure looks like this:

[alluxio namespace]

/

[ufs namespace]

/file

If I try to create a file through Alluxio at path /file and UFS sync is enabled, UFS sync will first kick in and load /file from the UFS. But this load won't pick up the (1 minute, FREE) TTL that we want to use for files loaded from UFS, because we're in the middle of a createFile() call, and createFile() doesn't know about the load TTL.

To fix this issue, every RPC needs to tell the master about both the create and load TTLs. Then the master can use the load TTL for any load operations, and the create TTL for any create operations.

Environment

None

Status

Assignee

Unassigned

Reporter

Andrew Audibert

Labels

None

Components

Affects versions

master

Priority

Major
Configure