@@ -38,8 +38,8 @@ void DeleteVertexExecutor::execute() {
38
38
auto *runner = ectx ()->rctx ()->runner ();
39
39
auto cb = [this ] (auto &&resp) {
40
40
if (!resp.ok ()) {
41
- DCHECK (onError_);
42
- onError_ ( Status::Error ( " Internal Error " ));
41
+ doError ( Status::Error ( " Internal Error " ),
42
+ ectx ()-> getGraphStats ()-> getDeleteVertexStats ( ));
43
43
return ;
44
44
}
45
45
auto rpcResp = std::move (resp).value ();
@@ -63,8 +63,8 @@ void DeleteVertexExecutor::execute() {
63
63
64
64
auto error = [this ] (auto &&e) {
65
65
LOG (ERROR) << " Exception caught: " << e.what ();
66
- DCHECK (onError_);
67
- onError_ ( Status::Error ( " Internal error " ));
66
+ doError ( Status::Error ( " Internal Error " ),
67
+ ectx ()-> getGraphStats ()-> getDeleteVertexStats ( ));
68
68
return ;
69
69
};
70
70
std::move (future).via (runner).thenValue (cb).thenError (error);
@@ -76,8 +76,8 @@ void DeleteVertexExecutor::deleteEdges(std::vector<storage::cpp2::EdgeKey>* edge
76
76
auto cb = [this ] (auto &&resp) {
77
77
auto completeness = resp.completeness ();
78
78
if (completeness != 100 ) {
79
- DCHECK (onError_);
80
- onError_ ( Status::Error ( " Internal Error " ));
79
+ doError ( Status::Error ( " Internal Error " ),
80
+ ectx ()-> getGraphStats ()-> getDeleteVertexStats ( ));
81
81
return ;
82
82
}
83
83
deleteVertex ();
@@ -86,8 +86,8 @@ void DeleteVertexExecutor::deleteEdges(std::vector<storage::cpp2::EdgeKey>* edge
86
86
87
87
auto error = [this ] (auto &&e) {
88
88
LOG (ERROR) << " Exception caught: " << e.what ();
89
- DCHECK (onError_);
90
- onError_ ( Status::Error ( " Internal error " ));
89
+ doError ( Status::Error ( " Internal Error " ),
90
+ ectx ()-> getGraphStats ()-> getDeleteVertexStats ( ));
91
91
return ;
92
92
};
93
93
std::move (future).via (runner).thenValue (cb).thenError (error);
@@ -98,19 +98,18 @@ void DeleteVertexExecutor::deleteVertex() {
98
98
auto *runner = ectx ()->rctx ()->runner ();
99
99
auto cb = [this ] (auto &&resp) {
100
100
if (!resp.ok ()) {
101
- DCHECK (onError_);
102
- onError_ ( Status::Error ( " Internal Error " ));
101
+ doError ( Status::Error ( " Internal Error " ),
102
+ ectx ()-> getGraphStats ()-> getDeleteVertexStats ( ));
103
103
return ;
104
104
}
105
- DCHECK (onFinish_);
106
- onFinish_ (Executor::ProcessControl::kNext );
105
+ doFinish (Executor::ProcessControl::kNext , ectx ()->getGraphStats ()->getDeleteVertexStats ());
107
106
return ;
108
107
};
109
108
110
109
auto error = [this ] (auto &&e) {
111
110
LOG (ERROR) << " Exception caught: " << e.what ();
112
- DCHECK (onError_);
113
- onError_ ( Status::Error ( " Internal error " ));
111
+ doError ( Status::Error ( " Internal Error " ),
112
+ ectx ()-> getGraphStats ()-> getDeleteVertexStats ( ));
114
113
return ;
115
114
};
116
115
std::move (future).via (runner).thenValue (cb).thenError (error);
0 commit comments