Problems about FileSystem and Env/SpecialEnv
The Env interfaces and file system interfaces have been separated after v6.6? And I am encountering some problems when trying to add a new file system.
First, we have SpecialEnv which inherits EnvWrapper, but EnvWrapper doesn't provide constructor with env's file system and the default constructor will initial a file system called LegacyFileSystemWrapper, the LegacyFileSystemWrapper will just call env(and its function) to operate file. So I made this pr https://github.com/facebook/rocksdb/pull/9267
Second, in db_wal_test.cc EnrichedSpecialEnv implements its DeleteFile, the function will be called by LegacyFileSystemWrapper (because LegacyFileSystemWrapper just call env's function) so that it will fail when you want to call you own filesystem.
@mrambacher
It's a big mess. It's not clear at all what it means to override a function in Env but to provide different functionality for the equivalent function in FileSystem. IMHO all the FileSystem-related functions in Env should be made non-virtual so that callers can still use them but there is not confusion about which implementation is authoritative (FileSystem).