stmt->hdr.stmt_filename, stmt->hdr.stmt_lno);
rc=wait_rc;
}
+ /**
+ * commit the transaction - in case the WAIT FOR
+ * above created one.
+ */
+ if (db_commit_xact((SlonikStmt *) stmt,
+ adminfo1) < 0)
+ {
+ rc = -1;
+ goto cleanup;
+ }
}
}
SlonikStmt_wait_event wait_event;
dstring_init(&query);
-
- if ( node_entry->num_nodes == 0 && node_entry->num_sets == 0 )
- {
- /**
- * This node is the origin of no sets but we still need to
- * let the rest of the cluster know that this node is considered
- * failed.
- */
-
- }
+
/*
* For every node determine the one with the event , preferring the backup
nodeinfo[i].adminfo, &query);
if (res1 == NULL)
{
- dstring_free(&query);
- return -1;
+ rc=-1;
+ goto cleanup;
}
slon_scanint64(PQgetvalue(res1, 0, 0), &ev_seqno);
goto cleanup;
}
+cleanup:
+
/*
* commit all open transactions despite of all possible errors
*/
nodeinfo[i].adminfo) < 0)
rc = -1;
}
-cleanup:
+
dstring_free(&query);
return rc;
}