Closed arschles closed 8 years ago
code LGTM; it looks like some new (or at least altered) functionality was introduced -- do units need to be updated/enhanced?
@vdice thanks. the semantics of the CheckInAndSetCluster
are the same (either create or update a cluster record), but the function was misnamed (due to me misunderstanding its purpose in an earlier patch).
Additionally, the upsertCluster
function was added to house the logic that CheckInAndSetCluster
used to have, so that the new implementation of CheckInAndSetCluster
could start a transaction, call upsertCluster
, and then rollback or commit the transaction depending on the result of upsertCluster
.
As a result of the above, I don't believe unit tests need to be updated. TestClusterRoundTrip
should cover creating (and then updating) a cluster.
The rewrite also enabled removing code that was no longer used
Contributes to #48
Still TODO:
CheckInAndSetCluster
in a txn