зеркало из https://github.com/github/vitess-gh.git
write action data before writing it to the action log - this reverts to previous behavior which was much easier to debug
This commit is contained in:
Родитель
7ad995e182
Коммит
e034766541
|
@ -212,10 +212,15 @@ func StoreActionResponse(zconn zk.Conn, actionNode *ActionNode, actionPath strin
|
|||
actionNode.State = ACTION_STATE_DONE
|
||||
}
|
||||
|
||||
// and write the data
|
||||
// Write the data first to our action node, then to the log.
|
||||
// In the error case, this node will be left behind to debug.
|
||||
data := ActionNodeToJson(actionNode)
|
||||
_, err := zconn.Set(actionPath, data, -1)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
actionLogPath := ActionToActionLogPath(actionPath)
|
||||
_, err := zk.CreateRecursive(zconn, actionLogPath, data, 0, zookeeper.WorldACL(zookeeper.PERM_ALL))
|
||||
_, err = zk.CreateRecursive(zconn, actionLogPath, data, 0, zookeeper.WorldACL(zookeeper.PERM_ALL))
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
|
@ -182,7 +182,7 @@ func FindAllTabletAliasesInShard(zconn zk.Conn, zkShardPath string) ([]TabletAli
|
|||
aliases := make([]TabletAlias, 0, len(children))
|
||||
for _, child := range children {
|
||||
alias := path.Base(child)
|
||||
if strings.Contains(alias, "action") {
|
||||
if strings.HasPrefix(alias, "action") {
|
||||
continue
|
||||
}
|
||||
zkTabletReplicationPath := path.Join(zkShardPath, child)
|
||||
|
|
Загрузка…
Ссылка в новой задаче