1212#include  < cinttypes> 
1313#include  < filesystem> 
1414
15- #include  " cloud/cloud_file_deletion_scheduler.h" 
16- #include  " cloud/cloud_file_system_impl.h" 
15+ #include  " rocksdb/ cloud/cloud_file_deletion_scheduler.h" 
16+ #include  " rocksdb/ cloud/cloud_file_system_impl.h" 
1717#include  " cloud/cloud_scheduler.h" 
18- #include  " cloud/cloud_storage_provider_impl.h" 
18+ #include  " cloud/cloud_manifest.h" 
19+ #include  " rocksdb/cloud/cloud_storage_provider_impl.h" 
1920#include  " cloud/db_cloud_impl.h" 
2021#include  " cloud/filename.h" 
2122#include  " cloud/manifest_reader.h" 
@@ -80,7 +81,7 @@ class CloudTest : public testing::Test {
8081
8182    CloudFileSystem* afs;
8283    //  create a dummy Gcp env
83-     ASSERT_OK (CloudFileSystem ::NewGcpFileSystem (base_env_->GetFileSystem (),
84+     ASSERT_OK (CloudFileSystemEnv ::NewGcpFileSystem (base_env_->GetFileSystem (),
8485                                                cloud_fs_options_,
8586                                                options_.info_log , &afs));
8687    ASSERT_NE (afs, nullptr );
@@ -140,7 +141,7 @@ class CloudTest : public testing::Test {
140141    //  Cleanup the cloud bucket
141142    if  (!cloud_fs_options_.src_bucket .GetBucketName ().empty ()) {
142143      CloudFileSystem* afs;
143-       Status st = CloudFileSystem ::NewGcpFileSystem (base_env_->GetFileSystem (),
144+       Status st = CloudFileSystemEnv ::NewGcpFileSystem (base_env_->GetFileSystem (),
144145                                                    cloud_fs_options_,
145146                                                    options_.info_log , &afs);
146147      if  (st.ok ()) {
@@ -155,11 +156,11 @@ class CloudTest : public testing::Test {
155156
156157  void  CreateCloudEnv () {
157158    CloudFileSystem* cfs;
158-     ASSERT_OK (CloudFileSystem ::NewGcpFileSystem (base_env_->GetFileSystem (),
159+     ASSERT_OK (CloudFileSystemEnv ::NewGcpFileSystem (base_env_->GetFileSystem (),
159160                                                cloud_fs_options_,
160161                                                options_.info_log , &cfs));
161162    std::shared_ptr<FileSystem> fs (cfs);
162-     aenv_ = CloudFileSystem ::NewCompositeEnv (base_env_, std::move (fs));
163+     aenv_ = CloudFileSystemEnv ::NewCompositeEnv (base_env_, std::move (fs));
163164  }
164165
165166  //  Open database via the cloud interface
@@ -245,7 +246,7 @@ class CloudTest : public testing::Test {
245246      copt.keep_local_sst_files  = true ;
246247    }
247248    //  Create new Gcp env
248-     Status st = CloudFileSystem ::NewGcpFileSystem (
249+     Status st = CloudFileSystemEnv ::NewGcpFileSystem (
249250        base_env_->GetFileSystem (), copt, options_.info_log , &cfs);
250251    if  (!st.ok ()) {
251252      return  st;
@@ -2447,7 +2448,7 @@ TEST_F(CloudTest, DisableObsoleteFileDeletionOnOpenTest) {
24472448  //  obsolete files are not deleted
24482449  EXPECT_EQ (GetAllLocalFiles ().size (), 8 );
24492450  //  obsolete files are deleted!
2450-   db_->EnableFileDeletions (false   /*  force  */  );
2451+   db_->EnableFileDeletions ();
24512452  EXPECT_EQ (GetAllLocalFiles ().size (), 6 );
24522453  CloseDB ();
24532454}
@@ -2820,7 +2821,7 @@ TEST_F(CloudTest, SanitizeDirectoryTest) {
28202821  EXPECT_EQ (local_files.size (), 7 );
28212822
28222823  EXPECT_OK (
2823-       GetCloudFileSystemImpl ()->SanitizeDirectory (options_, dbname_, false ));
2824+       GetCloudFileSystemImpl ()->SanitizeLocalDirectory (options_, dbname_, false ));
28242825
28252826  //  cleaning up during sanitization not triggered
28262827  EXPECT_EQ (local_files.size (), GetAllLocalFiles ().size ());
@@ -2830,7 +2831,7 @@ TEST_F(CloudTest, SanitizeDirectoryTest) {
28302831      base_env_->DeleteFile (MakeCloudManifestFile (dbname_, " "   /*  cooke */  )));
28312832
28322833  EXPECT_OK (
2833-       GetCloudFileSystemImpl ()->SanitizeDirectory (options_, dbname_, false ));
2834+       GetCloudFileSystemImpl ()->SanitizeLocalDirectory (options_, dbname_, false ));
28342835
28352836  local_files = GetAllLocalFiles ();
28362837  //  IDENTITY file is downloaded after cleaning up, which is the only file that
@@ -2852,7 +2853,7 @@ TEST_F(CloudTest, SanitizeDirectoryTest) {
28522853      base_env_->DeleteFile (MakeCloudManifestFile (dbname_, " "   /*  cooke */  )));
28532854
28542855  ASSERT_OK (
2855-       GetCloudFileSystemImpl ()->SanitizeDirectory (options_, dbname_, false ));
2856+       GetCloudFileSystemImpl ()->SanitizeLocalDirectory (options_, dbname_, false ));
28562857
28572858  //  IDENTITY file + the random directory we created
28582859  EXPECT_EQ (GetAllLocalFiles ().size (), 2 );
@@ -2874,7 +2875,7 @@ TEST_F(CloudTest, SanitizeDirectoryTest) {
28742875      base_env_->DeleteFile (MakeCloudManifestFile (dbname_, " "   /*  cooke */  )));
28752876
28762877  ASSERT_OK (
2877-       GetCloudFileSystemImpl ()->SanitizeDirectory (options_, dbname_, false ));
2878+       GetCloudFileSystemImpl ()->SanitizeLocalDirectory (options_, dbname_, false ));
28782879  SyncPoint::GetInstance ()->DisableProcessing ();
28792880}
28802881
@@ -3145,4 +3146,4 @@ int main(int, char**) {
31453146  return  0 ;
31463147}
31473148
3148- #endif   //  !ROCKSDB_LITE
3149+ #endif   //  !ROCKSDB_LITE
0 commit comments