Publish staged results only when the database commit succeeds
This commit is contained in:
1 parent
de6fa56a73
commit
d548e31c1d
1 file changed
+1
-1
@@ -149,7 +149,7 @@ static void ms_abort_pull(struct ms_session* s) {
|
||||
/* Commit не вызывает внешний код; публикация откладывается до безопасного выхода из receive. */
|
||||
static int ms_commit_pull(struct ms_session* s) {
|
||||
int rc = s->dataset->ops->commit_pull(s->dataset->data_ctx, s->pull);
|
||||
if (s->dataset->ops->publish_pull) { s->finished_pull = s->pull; s->pull = NULL; }
|
||||
if (rc >= 0 && s->dataset->ops->publish_pull) { s->finished_pull = s->pull; s->pull = NULL; }
|
||||
else ms_abort_pull(s);
|
||||
return rc;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user