slimtom95 opened a new issue, #7336:
URL: https://github.com/apache/gravitino/issues/7336

   ### Version
   
   main branch
   
   ### Describe what's wrong
   
   Let's take a look at the `extract_fileset` method in 
`clients/filesystem-fuse/src/gvfs_creator.rs` 
   
   ```
   pub fn extract_fileset(path: &str) -> GvfsResult<(String, String, String)> {
       let path = parse_location(path)?;
   
       if path.scheme() != GRAVITINO_FILESET_SCHEMA {
           return Err(InvalidConfig.to_error(format!("Invalid fileset schema: 
{}", path)));
       }
   
       let split = path.path_segments();
       if split.is_none() {
           return Err(InvalidConfig.to_error(format!("Invalid fileset path: 
{}", path)));
       }
       let split = split.unwrap().collect::<Vec<&str>>();
       if split.len() != 4 {
           return Err(InvalidConfig.to_error(format!("Invalid fileset path: 
{}", path)));
       }
   
       let catalog = split[1].to_string();
       let schema = split[2].to_string();
       let fileset = split[3].to_string();
       Ok((catalog, schema, fileset))
   }
   ```
   
   The method requires a url with 4 path segments, and set the catalog, schema, 
fileset as the second, third, 4th segment. 
   
   Given a url like `gvfs://fileset/demo_catalog/demo_schema/demo_fileset/`
   
   The url's authority is `fileset`, the path segments are `demo_catalog`, 
`demo_schema`, `demo_fileset` and an empty str.  So the current logic is 
obviously wrong, and the simplest fix would be changing the index from 1,2,3 to 
0,1,2.
   
   
   ### Error message and/or stacktrace
   
   The build of current version would not accept a standard gvfs path. (but at 
0.8.0, since there the first part is metalake, it's working at the time)
   
   ### How to reproduce
   
   just build the master, and mount, you'll see the falsely parsed fileset 
requests.
   
   ### Additional context
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to