diff --git a/docs/source/user_guide/clean.rst b/docs/source/user_guide/clean.rst index 5715c4b84..920b14d6d 100644 --- a/docs/source/user_guide/clean.rst +++ b/docs/source/user_guide/clean.rst @@ -41,8 +41,8 @@ Description - It runs as an independent task: construct a ``CleanContext`` and launch an ``OrphanFilesCleaner``. - It covers table-local index manifests and payloads as well as data files, - preserving files referenced by retained snapshots. It does not enumerate a - potentially shared ``global-index.external-path``. + preserving files referenced by retained snapshots. It does not enumerate + potentially shared ``global-index.external-path`` or ``global-index.external-paths`` roots. - Tables with tags or branches, or snapshots with a changelog manifest list, are rejected with ``NotImplemented``. Tag retention during snapshot expiration is supported separately, as described below. @@ -127,7 +127,7 @@ Description - Data files, index manifests and index payloads referenced by retained snapshots or current-branch tags are preserved. Retired index payloads are deleted before their index manifests, including payloads stored under - ``global-index.external-path``. + ``global-index.external-path`` or ``global-index.external-paths``. - Expiration on a branch other than main, or on a table with such a branch under ``branch/branch-``, is not supported: branches share the table's data files, so expiration returns ``NotImplemented`` before deleting anything. diff --git a/include/paimon/defs.h b/include/paimon/defs.h index a39a2e128..750d6fc07 100644 --- a/include/paimon/defs.h +++ b/include/paimon/defs.h @@ -633,10 +633,15 @@ struct PAIMON_EXPORT Options { /// "global-index.thread-num" - The maximum number of concurrent scanner for global index. No /// default value. By default is the number of processors available to the machine. static const char GLOBAL_INDEX_THREAD_NUM[]; - /// "global-index.external-path" - Comma-separated global index root directories. New files - /// and checkpoints use independent round robin. If not set, the global index - /// files will be stored under the index directory. + /// "global-index.external-path" - A single global index root URI, including literal commas. + /// Used when "global-index.external-paths" is absent. If neither option is set, global index + /// files are stored under the table index directory. static const char GLOBAL_INDEX_EXTERNAL_PATH[]; + /// "global-index.external-paths" - Comma-separated global index root directories. New files + /// and checkpoints use independent round robin. Takes precedence over + /// "global-index.external-path", including when empty; an empty value uses the table index + /// directory. + static const char GLOBAL_INDEX_EXTERNAL_PATHS[]; /// "global-index.search-mode" - Fallback for full-text, scalar and vector index search modes. /// Accepts "fast", "full" or "detail". Families default to "fast" when neither option is set. static const char GLOBAL_INDEX_SEARCH_MODE[]; diff --git a/src/paimon/common/defs.cpp b/src/paimon/common/defs.cpp index 703d13bda..91c038f69 100644 --- a/src/paimon/common/defs.cpp +++ b/src/paimon/common/defs.cpp @@ -165,6 +165,7 @@ const char Options::BLOB_WRITE_NULL_ON_FETCH_FAILURE[] = "blob-write-null-on-fet const char Options::GLOBAL_INDEX_ENABLED[] = "global-index.enabled"; const char Options::GLOBAL_INDEX_THREAD_NUM[] = "global-index.thread-num"; const char Options::GLOBAL_INDEX_EXTERNAL_PATH[] = "global-index.external-path"; +const char Options::GLOBAL_INDEX_EXTERNAL_PATHS[] = "global-index.external-paths"; const char Options::GLOBAL_INDEX_SEARCH_MODE[] = "global-index.search-mode"; const char Options::FULL_TEXT_INDEX_SEARCH_MODE[] = "full-text-index.search-mode"; const char Options::SCALAR_INDEX_SEARCH_MODE[] = "scalar-index.search-mode"; diff --git a/src/paimon/core/catalog/file_system_catalog_test.cpp b/src/paimon/core/catalog/file_system_catalog_test.cpp index 10dd814dd..ebe00acbf 100644 --- a/src/paimon/core/catalog/file_system_catalog_test.cpp +++ b/src/paimon/core/catalog/file_system_catalog_test.cpp @@ -1240,7 +1240,7 @@ TEST(FileSystemCatalogTest, TestDropTableWithGlobalIndexExternalPathsOnMainBranc FileSystemCatalog catalog(core_options.GetFileSystem(), dir->Str(), options); ASSERT_OK(catalog.CreateDatabase("test_db", options, /*ignore_if_exists=*/false)); - // Create external path directory for global index + // Create external directories for the global index path list. auto global_index_dir = UniqueTestDirectory::Create(); ASSERT_TRUE(global_index_dir); std::string global_index_path = global_index_dir->Str(); @@ -1249,8 +1249,9 @@ TEST(FileSystemCatalogTest, TestDropTableWithGlobalIndexExternalPathsOnMainBranc ASSERT_TRUE(second_index_dir); std::string second_index_path = "FILE://" + second_index_dir->Str(); - // Create a file in external path to simulate global index data - ASSERT_OK_AND_ASSIGN(auto fs, FileSystemFactory::Get("local", dir->Str(), {})); + // Create a file in each external directory to simulate global index data. + ASSERT_OK_AND_ASSIGN(std::shared_ptr fs, + FileSystemFactory::Get("local", dir->Str(), {})); std::string index_file = PathUtil::JoinPath(global_index_path, "index-file.bin"); ASSERT_OK(fs->WriteFile(index_file, "index data", /*overwrite=*/true)); std::string second_index_file = PathUtil::JoinPath(second_index_path, "index-file.bin"); @@ -1260,7 +1261,7 @@ TEST(FileSystemCatalogTest, TestDropTableWithGlobalIndexExternalPathsOnMainBranc ASSERT_OK_AND_ASSIGN(bool index_file_exists, fs->Exists(index_file)); ASSERT_TRUE(index_file_exists); - // Create table with global index external path on main branch + // Create the initial schema with the legacy global index root. arrow::FieldVector fields = { arrow::field("f0", arrow::int32()), arrow::field("f1", arrow::utf8()), @@ -1270,12 +1271,26 @@ TEST(FileSystemCatalogTest, TestDropTableWithGlobalIndexExternalPathsOnMainBranc ASSERT_TRUE(arrow::ExportSchema(typed_schema, &schema).ok()); std::map table_options = options; - table_options[Options::GLOBAL_INDEX_EXTERNAL_PATH] = - global_index_path + "," + second_index_path; + std::string legacy_path = PathUtil::JoinPath("FILE://" + dir->Str(), "legacy,index"); + std::string unrelated_path = PathUtil::JoinPath("FILE://" + dir->Str(), "legacy"); + ASSERT_OK(fs->WriteFile(PathUtil::JoinPath(legacy_path, "index.bin"), "legacy", false)); + ASSERT_OK(fs->WriteFile(PathUtil::JoinPath(unrelated_path, "keep.bin"), "keep", false)); + table_options[Options::GLOBAL_INDEX_EXTERNAL_PATH] = legacy_path; ASSERT_OK(catalog.CreateTable(Identifier("test_db", "tbl_global_index"), &schema, {}, {}, table_options, false)); + // The new schema uses the list while retaining the overridden legacy option. + table_options[Options::GLOBAL_INDEX_EXTERNAL_PATHS] = + global_index_path + "," + second_index_path; + ASSERT_OK_AND_ASSIGN(std::string table_path, + catalog.GetTableLocation(Identifier("test_db", "tbl_global_index"))); + SchemaManager schema_manager(fs, table_path); + ASSERT_OK_AND_ASSIGN(std::unique_ptr new_schema, + TableSchema::Create(1, arrow::schema(fields), {}, {}, table_options)); + ASSERT_OK_AND_ASSIGN(std::string schema_json, new_schema->ToJsonString()); + ASSERT_OK(fs->AtomicStore(schema_manager.ToSchemaPath(1), schema_json)); + // Verify table exists ASSERT_OK_AND_ASSIGN(bool table_exists, catalog.TableExists(Identifier("test_db", "tbl_global_index"))); @@ -1290,18 +1305,22 @@ TEST(FileSystemCatalogTest, TestDropTableWithGlobalIndexExternalPathsOnMainBranc catalog.TableExists(Identifier("test_db", "tbl_global_index"))); ASSERT_FALSE(table_exists); - // Verify global index external path is also cleaned up + // Verify roots from both schema versions are removed and the unrelated directory is preserved. ASSERT_OK_AND_ASSIGN(bool global_index_exists, fs->Exists(global_index_path)); ASSERT_FALSE(global_index_exists); ASSERT_OK_AND_ASSIGN(global_index_exists, fs->Exists(second_index_path)); ASSERT_FALSE(global_index_exists); + ASSERT_OK_AND_ASSIGN(global_index_exists, fs->Exists(legacy_path)); + ASSERT_FALSE(global_index_exists); + ASSERT_OK_AND_ASSIGN(global_index_exists, fs->Exists(unrelated_path)); + ASSERT_TRUE(global_index_exists); ArrowSchemaRelease(&schema); } TEST(FileSystemCatalogTest, TestDropTableWithGlobalIndexExternalPathsOnBranch) { // Copy the real append_table_with_rt_branch.db test data, then patch the - // branch-rt schema-1 to include a GLOBAL_INDEX_EXTERNAL_PATH option. + // branch-rt schema-1 to include a GLOBAL_INDEX_EXTERNAL_PATHS option. // DropTable should discover and clean up that external path. std::map options; options[Options::FILE_SYSTEM] = "local"; @@ -1325,7 +1344,7 @@ TEST(FileSystemCatalogTest, TestDropTableWithGlobalIndexExternalPathsOnBranch) { ASSERT_OK(fs->WriteFile(PathUtil::JoinPath(branch_external_path, "index.bin"), "branch global index data", /*overwrite=*/true)); - // Patch branch-rt/schema/schema-1: add GLOBAL_INDEX_EXTERNAL_PATH to options + // Patch branch-rt/schema/schema-1: add GLOBAL_INDEX_EXTERNAL_PATHS to options std::string branch_schema_path = PathUtil::JoinPath(db_path, "append_table_with_rt_branch/branch/branch-rt/schema/schema-1"); std::string schema_content; @@ -1334,10 +1353,10 @@ TEST(FileSystemCatalogTest, TestDropTableWithGlobalIndexExternalPathsOnBranch) { // Insert the global index external path option into the JSON options block. // Original: "file.format" : "orc" // Patched: "file.format" : "orc", - // "global-index.external-path" : "" + // "global-index.external-paths" : "" std::string search_str = R"("file.format" : "orc")"; std::string replace_str = R"("file.format" : "orc", - "global-index.external-path" : ")" + + "global-index.external-paths" : ")" + branch_external_path + R"(")"; auto pos = schema_content.rfind(search_str); ASSERT_NE(pos, std::string::npos); @@ -1554,15 +1573,16 @@ TEST(FileSystemCatalogTest, TestDropTableWithBranchExternalPaths) { ASSERT_OK(fs->WriteFile(PathUtil::JoinPath(branch_external_path, "data.orc"), "branch external data", /*overwrite=*/true)); - // Patch branch-rt/schema/schema-1: add DATA_FILE_EXTERNAL_PATHS to options + // Patch branch-rt/schema/schema-1 with the external data path and its write strategy. std::string branch_schema_path = PathUtil::JoinPath(db_path, "append_table_with_rt_branch/branch/branch-rt/schema/schema-1"); std::string schema_content; ASSERT_OK(fs->ReadFile(branch_schema_path, &schema_content)); - // Insert the external path option into the JSON options block. + // Insert the external path and strategy options into the JSON options block. // Original: "file.format" : "orc" // Patched: "file.format" : "orc", + // "data-file.external-paths.strategy" : "round-robin", // "data-file.external-paths" : "" std::string search_str = R"("file.format" : "orc")"; std::string replace_str = R"("file.format" : "orc", diff --git a/src/paimon/core/core_options.cpp b/src/paimon/core/core_options.cpp index 2e92d7c98..177433a0c 100644 --- a/src/paimon/core/core_options.cpp +++ b/src/paimon/core/core_options.cpp @@ -407,6 +407,7 @@ struct CoreOptions::Impl { std::optional data_file_external_paths; std::optional data_file_external_paths_weights; std::optional changelog_file_compression; + std::optional global_index_external_path; std::optional global_index_external_paths; std::optional scan_tag_name; CompressOptions lookup_compress_options{"zstd", 1}; @@ -952,9 +953,12 @@ struct CoreOptions::Impl { // Parse global-index.filter.refine-from-data, default false PAIMON_RETURN_NOT_OK(parser.Parse(Options::GLOBAL_INDEX_FILTER_REFINE_FROM_DATA, &global_index_filter_refine_from_data)); - // Parse global-index.external-path - global index root directories + // Parse global-index.external-path, the legacy single external global index root directory PAIMON_RETURN_NOT_OK( - parser.Parse(Options::GLOBAL_INDEX_EXTERNAL_PATH, &global_index_external_paths)); + parser.Parse(Options::GLOBAL_INDEX_EXTERNAL_PATH, &global_index_external_path)); + // Parse global-index.external-paths, external global index root directories + PAIMON_RETURN_NOT_OK( + parser.Parse(Options::GLOBAL_INDEX_EXTERNAL_PATHS, &global_index_external_paths)); return Status::OK(); } @@ -1989,10 +1993,30 @@ std::optional CoreOptions::GetGlobalIndexExternalPaths() const { return impl_->global_index_external_paths; } +Result> CoreOptions::CreateGlobalIndexExternalPath() const { + if (!impl_->global_index_external_path || impl_->global_index_external_path->empty()) { + return std::optional(); + } + std::string value = impl_->global_index_external_path.value(); + StringUtils::Trim(&value); + PAIMON_ASSIGN_OR_RAISE(Path path, PathUtil::ToPath(value)); + if (path.scheme.empty()) { + return Status::Invalid(fmt::format("scheme is null, path is {}", value)); + } + return std::optional(path.ToString()); +} + Result> CoreOptions::CreateGlobalIndexExternalPaths() const { std::vector external_paths; std::optional global_index_external_paths = GetGlobalIndexExternalPaths(); - if (!global_index_external_paths || global_index_external_paths->empty()) { + if (!global_index_external_paths) { + PAIMON_ASSIGN_OR_RAISE(std::optional path, CreateGlobalIndexExternalPath()); + if (path) { + external_paths.push_back(path.value()); + } + return external_paths; + } + if (global_index_external_paths->empty()) { return external_paths; } for (auto tmp_path : StringUtils::Split(global_index_external_paths.value(), ",")) { diff --git a/src/paimon/core/core_options.h b/src/paimon/core/core_options.h index e513d5d93..a399c887d 100644 --- a/src/paimon/core/core_options.h +++ b/src/paimon/core/core_options.h @@ -278,6 +278,7 @@ class PAIMON_EXPORT CoreOptions { std::string FormatTableFileCompression() const; bool GlobalIndexEnabled() const; + Result> CreateGlobalIndexExternalPath() const; Result> CreateGlobalIndexExternalPaths() const; std::optional GetScanTagName() const; diff --git a/src/paimon/core/core_options_test.cpp b/src/paimon/core/core_options_test.cpp index 0a6709471..eb20cb1ac 100644 --- a/src/paimon/core/core_options_test.cpp +++ b/src/paimon/core/core_options_test.cpp @@ -497,8 +497,9 @@ TEST(CoreOptionsTest, TestFromMap) { ASSERT_FALSE(core_options.GlobalIndexEnabled()); ASSERT_TRUE(core_options.GlobalIndexFilterRefineFromData()); ASSERT_EQ(core_options.GetGlobalIndexThreadNum(), 4); - ASSERT_TRUE(core_options.GetGlobalIndexExternalPaths()); - ASSERT_EQ(core_options.GetGlobalIndexExternalPaths().value(), "FILE:///tmp/global_index/"); + ASSERT_OK_AND_ASSIGN(std::optional global_index_path, + core_options.CreateGlobalIndexExternalPath()); + ASSERT_EQ(global_index_path, "FILE:/tmp/global_index"); ASSERT_EQ("test-tag", core_options.GetScanTagName().value()); ASSERT_EQ(StartupMode::FromSnapshotFull(), core_options.GetStartupMode()); ASSERT_EQ(375809637, core_options.GetCompactionFileSize(/*has_primary_key=*/true)); @@ -900,27 +901,84 @@ TEST(CoreOptionsTest, TestCreateGlobalIndexExternalPaths) { } TEST(CoreOptionsTest, GlobalIndexExternalPathsList) { - for (const std::string value : {"FILE:///a, FILE:///b", ",FILE:///a,,FILE:///b,"}) { + for (const std::string value : + {"FILE:///a, FILE:///b", " FILE:///a/ , FILE:///b/ ", "FILE:///a,FILE:///b,", + "FILE:///a,FILE:///b,,", ",FILE:///a,FILE:///b", "FILE:///a,,FILE:///b", + ",FILE:///a,,FILE:///b,"}) { ASSERT_OK_AND_ASSIGN(CoreOptions options, - CoreOptions::FromMap({{Options::GLOBAL_INDEX_EXTERNAL_PATH, value}})); + CoreOptions::FromMap({{Options::GLOBAL_INDEX_EXTERNAL_PATHS, value}})); ASSERT_OK_AND_ASSIGN(std::vector paths, options.CreateGlobalIndexExternalPaths()); ASSERT_EQ(paths, std::vector({"FILE:/a", "FILE:/b"})); } - for (const std::string value : {",", " ", "FILE:///a,/b", "FILE:///a, ,FILE:///b"}) { + for (const std::string value : + {"FILE:///a", " FILE:///a/ ", ",FILE:///a", "FILE:///a,", ",,FILE:///a,,"}) { ASSERT_OK_AND_ASSIGN(CoreOptions options, - CoreOptions::FromMap({{Options::GLOBAL_INDEX_EXTERNAL_PATH, value}})); + CoreOptions::FromMap({{Options::GLOBAL_INDEX_EXTERNAL_PATHS, value}})); + ASSERT_OK_AND_ASSIGN(std::vector paths, + options.CreateGlobalIndexExternalPaths()); + ASSERT_EQ(paths, std::vector({"FILE:/a"})); + } + for (const std::string value : {",", ",,", " ", "a", " ,FILE:///a", "FILE:///a, ", + "FILE:///a,/b", "FILE:///a, ,FILE:///b"}) { + ASSERT_OK_AND_ASSIGN(CoreOptions options, + CoreOptions::FromMap({{Options::GLOBAL_INDEX_EXTERNAL_PATHS, value}})); ASSERT_NOK(options.CreateGlobalIndexExternalPaths()); } ASSERT_OK_AND_ASSIGN(CoreOptions options, CoreOptions::FromMap({})); ASSERT_OK_AND_ASSIGN(std::vector paths, options.CreateGlobalIndexExternalPaths()); ASSERT_TRUE(paths.empty()); ASSERT_OK_AND_ASSIGN(options, - CoreOptions::FromMap({{Options::GLOBAL_INDEX_EXTERNAL_PATH, ""}})); + CoreOptions::FromMap({{Options::GLOBAL_INDEX_EXTERNAL_PATHS, ""}})); ASSERT_OK_AND_ASSIGN(paths, options.CreateGlobalIndexExternalPaths()); ASSERT_TRUE(paths.empty()); } +TEST(CoreOptionsTest, LegacyGlobalIndexExternalPath) { + for (const auto& [value, expected] : + std::map{{"FILE:///a", "FILE:/a"}, + {" FILE:///a/ ", "FILE:/a"}, + {"FILE:///index,archive", "FILE:/index,archive"}, + {"FILE:///a,", "FILE:/a,"}, + {"FILE:///a,,", "FILE:/a,,"}}) { + ASSERT_OK_AND_ASSIGN(CoreOptions options, + CoreOptions::FromMap({{Options::GLOBAL_INDEX_EXTERNAL_PATH, value}})); + ASSERT_OK_AND_ASSIGN(std::optional path, + options.CreateGlobalIndexExternalPath()); + ASSERT_EQ(path, expected); + ASSERT_OK_AND_ASSIGN(std::vector paths, + options.CreateGlobalIndexExternalPaths()); + ASSERT_EQ(paths, std::vector({expected})); + } + for (const std::string value : {" ", "a", "/index", ",", ",,"}) { + ASSERT_OK_AND_ASSIGN(CoreOptions options, + CoreOptions::FromMap({{Options::GLOBAL_INDEX_EXTERNAL_PATH, value}})); + ASSERT_NOK(options.CreateGlobalIndexExternalPath()); + ASSERT_NOK(options.CreateGlobalIndexExternalPaths()); + } +} + +TEST(CoreOptionsTest, GlobalIndexExternalPathsPrecedence) { + for (const std::string legacy : {"FILE:///index,archive", "/invalid-legacy-root"}) { + std::map raw_options = { + {Options::GLOBAL_INDEX_EXTERNAL_PATH, legacy}, + {Options::GLOBAL_INDEX_EXTERNAL_PATHS, "FILE:///a,FILE:///b"}, + {Options::DATA_FILE_EXTERNAL_PATHS_STRATEGY, "round-robin"}, + {Options::DATA_FILE_EXTERNAL_PATHS_WEIGHTS, "1,99"}}; + ASSERT_OK_AND_ASSIGN(CoreOptions options, CoreOptions::FromMap(raw_options)); + ASSERT_OK_AND_ASSIGN(std::vector paths, + options.CreateGlobalIndexExternalPaths()); + ASSERT_EQ(paths, std::vector({"FILE:/a", "FILE:/b"})); + raw_options[Options::GLOBAL_INDEX_EXTERNAL_PATHS] = ""; + ASSERT_OK_AND_ASSIGN(options, CoreOptions::FromMap(raw_options)); + ASSERT_OK_AND_ASSIGN(paths, options.CreateGlobalIndexExternalPaths()); + ASSERT_TRUE(paths.empty()); + raw_options[Options::GLOBAL_INDEX_EXTERNAL_PATHS] = "FILE:///a,/b"; + ASSERT_OK_AND_ASSIGN(options, CoreOptions::FromMap(raw_options)); + ASSERT_NOK(options.CreateGlobalIndexExternalPaths()); + } +} + TEST(CoreOptionsTest, ExternalPathWeights) { for (const std::string value : {"1, 3", "1,3,", "+1,3,,", "1,,3", ",1,3", "1,,3,"}) { ASSERT_OK_AND_ASSIGN( diff --git a/src/paimon/core/global_index/global_index_file_manager_test.cpp b/src/paimon/core/global_index/global_index_file_manager_test.cpp index e40028cbf..3d1343123 100644 --- a/src/paimon/core/global_index/global_index_file_manager_test.cpp +++ b/src/paimon/core/global_index/global_index_file_manager_test.cpp @@ -345,7 +345,7 @@ TEST_F(GlobalIndexFileManagerTest, LatestCheckpointIgnoresDuplicateOlderIds) { TEST_F(GlobalIndexFileManagerTest, TaskCleanupVisitsAllRootsAfterAnError) { std::string root_a = "file:" + PathUtil::JoinPath(dir_->Str(), "a"); std::string root_b = "file:" + PathUtil::JoinPath(dir_->Str(), "b"); - ASSERT_OK(CreateSchema({{Options::GLOBAL_INDEX_EXTERNAL_PATH, root_a + "," + root_b}})); + ASSERT_OK(CreateSchema({{Options::GLOBAL_INDEX_EXTERNAL_PATHS, root_a + "," + root_b}})); std::string directory_a = PathUtil::JoinPath(root_a, "checkpoint/task-1"); std::string directory_b = PathUtil::JoinPath(root_b, "checkpoint/task-1"); ASSERT_OK(fs_->WriteFile(PathUtil::JoinPath(directory_a, "unfinished"), "x", false)); @@ -540,7 +540,7 @@ TEST_F(GlobalIndexFileManagerTest, TestDeleteExternalTaskCheckpointFromSchemaAnd ASSERT_OK(fs_->WriteFile(path, "retained", /*overwrite=*/false)); } std::map overrides = { - {Options::GLOBAL_INDEX_EXTERNAL_PATH, " " + override_path + "/ "}}; + {Options::GLOBAL_INDEX_EXTERNAL_PATHS, " " + override_path + "/ "}}; ASSERT_OK(GlobalIndexWriteTask::DeleteCheckpoint(dir_->Str(), "task-1", overrides, fs_)); ASSERT_OK_AND_ASSIGN(bool exists, fs_->Exists(override_directory)); ASSERT_FALSE(exists); @@ -563,7 +563,7 @@ TEST_F(GlobalIndexFileManagerTest, TestDeleteExternalTaskCheckpointFromSchemaAnd } ASSERT_OK(GlobalIndexWriteTask::DeleteCheckpoint( - dir_->Str(), "task-1", {{Options::GLOBAL_INDEX_EXTERNAL_PATH, ""}}, fs_)); + dir_->Str(), "task-1", {{Options::GLOBAL_INDEX_EXTERNAL_PATHS, ""}}, fs_)); ASSERT_OK_AND_ASSIGN(exists, fs_->Exists(local_directory)); ASSERT_FALSE(exists); }