@@ -725,18 +725,7 @@ inline TString Interval(const TDuration& value) {
725
725
return TStringBuilder () << " Interval('PT" << value.Seconds () << " S')" ;
726
726
}
727
727
728
- TString BuildCreateReplicationQuery (
729
- const TString& name,
730
- const TString& dbPath,
731
- const NReplication::TReplicationDescription& desc,
732
- const TString& backupRoot,
733
- NYql::TIssues& issues)
734
- {
735
- // TODO(ilnaz)
736
- Y_UNUSED (dbPath);
737
- Y_UNUSED (backupRoot);
738
- Y_UNUSED (issues);
739
-
728
+ TString BuildCreateReplicationQuery (const TString& name, const NReplication::TReplicationDescription& desc) {
740
729
TVector<TString> targets (::Reserve (desc.GetItems ().size ()));
741
730
for (const auto & item : desc.GetItems ()) {
742
731
if (!item.DstPath .ends_with (" /indexImplTable" )) { // TODO(ilnaz): get rid of this hack
@@ -769,22 +758,12 @@ TString BuildCreateReplicationQuery(
769
758
770
759
}
771
760
772
- void BackupReplication (
773
- TDriver driver,
774
- const TString& dbBackupRoot,
775
- const TString& dbPathRelativeToBackupRoot,
776
- const TFsPath& fsBackupFolder,
777
- NYql::TIssues& issues)
778
- {
779
- Y_ENSURE (!dbPathRelativeToBackupRoot.empty ());
780
- const auto dbPath = JoinDatabasePath (dbBackupRoot, dbPathRelativeToBackupRoot);
781
-
761
+ void BackupReplication (TDriver driver, const TString& dbPath, const TFsPath& fsBackupFolder) {
762
+ Y_ENSURE (!dbPath.empty ());
782
763
LOG_I (" Backup async replication " << dbPath.Quote () << " to " << fsBackupFolder.GetPath ().Quote ());
783
764
784
- const auto name = TFsPath (dbPathRelativeToBackupRoot).GetName ();
785
765
const auto desc = DescribeReplication (driver, dbPath);
786
- const auto creationQuery = BuildCreateReplicationQuery (name, dbPath, desc, dbBackupRoot, issues);
787
- Y_ENSURE (creationQuery, issues.ToString ());
766
+ const auto creationQuery = BuildCreateReplicationQuery (fsBackupFolder.GetName (), desc);
788
767
789
768
WriteCreationQueryToFile (creationQuery, fsBackupFolder, NDump::NFiles::CreateAsyncReplication ());
790
769
BackupPermissions (driver, dbPath, fsBackupFolder);
@@ -884,7 +863,7 @@ void BackupFolderImpl(TDriver driver, const TString& dbPrefix, const TString& ba
884
863
BackupCoordinationNode (driver, dbIt.GetFullPath (), childFolderPath);
885
864
}
886
865
if (dbIt.IsReplication ()) {
887
- BackupReplication (driver, dbIt.GetTraverseRoot (), dbIt. GetRelPath (), childFolderPath, issues );
866
+ BackupReplication (driver, dbIt.GetFullPath (), childFolderPath);
888
867
}
889
868
dbIt.Next ();
890
869
}
0 commit comments