Repository: Alluxio/alluxio (language: java)

Issue:
"ls" a newly created file causes the file deleted from Alluxio
**Alluxio Version:**
2.7.1

**Describe the bug**
"ls" a newly created file causes the file deleted from Alluxio.

**To Reproduce**

```
$ ./bin/alluxio fs /test/
-rw-rw-rw-  alluxio  alluxio   12353   PERSISTED 12-05-2022 13:50:33:667 100% /test/file.01
-rw-rw-rw-  alluxio  alluxio   12353   PERSISTED 12-05-2022 13:52:44:480 100% /test/file.02

$ ./bin/alluxio fs copyFromLocal test_file /test/file.03
Copied file:///... to /test/file.03

// It needs to "ls" the file directly here. If "ls" the directory, the issue will not occur.
$ ./bin/alluxio fs /test/file.03
Path "/test/file.03" does not exist.

$ ./bin/alluxio fs /test/
-rw-rw-rw-  alluxio  alluxio   12353   PERSISTED 12-05-2022 13:50:33:667 100% /test/file.01
-rw-rw-rw-  alluxio  alluxio   12353   PERSISTED 12-05-2022 13:52:44:480 100% /test/file.02
```

**Expected behavior**
The file should exist in Alluxio.

**Urgency**
Urgent.

**Are you planning to fix it**
Yes



Discussion / hints:
After some investigation, I have the following finding
1. Alluxio uses UfsAbsentPathCache to cache paths that do not exist in UFS, so it does not need to access UFS every time.
2. When "ls" a file, if the file is "persisted" and exist in UfsAbsentPathCache with a valid timestamp, the file will be deleted from Alluxio.
3. When creating a file, if write type is "through" or "cache_through", the file will be removed from UfsAbsentPathCache immediately.
4. When creating a file, if write type is "async_through", the file SHOULD be removed from UfsAbsentPathCache after persisting it. But the current version missed this. I will fix it.
5. "ls" with "alluxio.user.file.metadata.sync.interval=0" is not affected by this issue.

Fix patch:
diff --git a/core/server/master/src/main/java/alluxio/master/file/DefaultFileSystemMaster.java b/core/server/master/src/main/java/alluxio/master/file/DefaultFileSystemMaster.java
index 15a7b439cd0a..fe2a2e92324a 100644
--- a/core/server/master/src/main/java/alluxio/master/file/DefaultFileSystemMaster.java
+++ b/core/server/master/src/main/java/alluxio/master/file/DefaultFileSystemMaster.java
@@ -4642,6 +4642,7 @@ private void handleSuccess(PersistJob job) {
                 .setPersistenceState(PersistenceState.PERSISTED.name())
                 .build());
             propagatePersistedInternal(journalContext, inodePath);
+            mUfsAbsentPathCache.processExisting(inodePath.getUri());
             Metrics.FILES_PERSISTED.inc();
 
             // Save state for possible cleanup


Test patch: