Skip to content
This repository has been archived by the owner on Oct 7, 2023. It is now read-only.

zketcd: initial multiop support #57

Merged
merged 3 commits into from Jun 1, 2017

Conversation

heyitsanthony
Copy link
Contributor

Reworks create/delete/setdata into composable txn functions,
then compose them into a single stm txn for atomicity. Also
extends wire protocol to encode multiop responses.

Fixes #38

Haven't been able to get clickhouse to issue multi-ops yet, so this is a first cut.

/cc @ztlpn

zketcd.go Outdated
@@ -186,17 +175,29 @@ func (z *zkEtcd) Ping(xid Xid, op *PingRequest) ZKResponse {
}

func (z *zkEtcd) Delete(xid Xid, op *DeleteRequest) ZKResponse {
b := z.mkDeleteTxnOp(op)
resp, zkresp := z.doWrappedSTM(xid, b.apply)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resp, err := z.doWrappedSTM is more readable.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or zkErr

@xiang90
Copy link
Contributor

xiang90 commented Jun 1, 2017

I took a very quick look. Everything seems reasonable. LGTM.

Reworks create/delete/setdata into composable txn functions,
then compose them into a single stm txn for atomicity. Also
extends wire protocol to encode multiop responses.

Fixes etcd-io#38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants