@@ -754,7 +754,7 @@ TFuture<ICheckpointStorage::TGetCoordinatorsResult> TCheckpointStorage::GetCoord
754
754
[getContext] (const TFuture<TIssues>& future) {
755
755
auto result = TGetCoordinatorsResult (
756
756
std::move (getContext->Coordinators ),
757
- std::move ( future.GetValue () ));
757
+ future.GetValue ());
758
758
return MakeFuture (result);
759
759
});
760
760
}
@@ -803,13 +803,11 @@ TFuture<ICheckpointStorage::TCreateCheckpointResult> TCheckpointStorage::CreateC
803
803
return CreateCheckpointWrapper (future, checkpointContext);
804
804
});
805
805
806
- return future.Apply (
807
- [checkpointContext](const TFuture<NYdb::TStatus>& future) {
808
- if (NYql::TIssues issues = StatusToIssues (future.GetValue ())) {
809
- return TCreateCheckpointResult (TString (), std::move (issues));
810
- } else {
811
- return TCreateCheckpointResult (checkpointContext->CheckpointGraphDescriptionContext ->GraphDescId , NYql::TIssues ());
812
- }
806
+ return StatusToIssues (future).Apply (
807
+ [checkpointContext] (const TFuture<TIssues>& future) {
808
+ NYql::TIssues issues = future.GetValue ();
809
+ TString descId = !issues ? checkpointContext->CheckpointGraphDescriptionContext ->GraphDescId : TString ();
810
+ return TCreateCheckpointResult (descId, issues);
813
811
});
814
812
}
815
813
@@ -898,7 +896,7 @@ TFuture<ICheckpointStorage::TGetCheckpointsResult> TCheckpointStorage::GetCheckp
898
896
899
897
return StatusToIssues (future).Apply (
900
898
[getContext] (const TFuture<TIssues>& future) {
901
- auto result = TGetCheckpointsResult (std::move (getContext->Checkpoints ), std::move ( future.GetValue () ));
899
+ auto result = TGetCheckpointsResult (std::move (getContext->Checkpoints ), future.GetValue ());
902
900
return MakeFuture (result);
903
901
});
904
902
}
@@ -1097,9 +1095,10 @@ TFuture<ICheckpointStorage::TGetTotalCheckpointsStateSizeResult> TCheckpointStor
1097
1095
return status;
1098
1096
});
1099
1097
});
1100
- return future.Apply (
1101
- [result](const TFuture<TStatus>& status) {
1102
- return std::make_pair (std::move (result->Size ), std::move (status.GetValue ().GetIssues ()));
1098
+
1099
+ return StatusToIssues (future).Apply (
1100
+ [result] (const TFuture<TIssues>& future) {
1101
+ return std::make_pair (result->Size , future.GetValue ());
1103
1102
});
1104
1103
}
1105
1104
0 commit comments