Commit 77a69df1 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 7fc32050
......@@ -511,7 +511,8 @@ type InvalidateObjects struct {
}
// Unlock information on a transaction. PM -> S.
type UnlockInformation struct {
// XXX -> InformationUnlocked?
type NotifyUnlockInformation struct {
TTID zodb.Tid
}
......@@ -528,7 +529,8 @@ type AnswerNewOIDs struct {
// Ask master to generate a new TTID that will be used by the client
// to rebase a transaction. S -> PM -> C
type Deadlock struct {
// XXX -> Deadlocked?
type NotifyDeadlock struct {
TTid zodb.Tid
LockingTid zodb.Tid
}
......
......@@ -24,8 +24,8 @@
# pyname -> goname
renames = {}
def noask(name):
renames['Ask'+name] = name
def noask(name): renames['Ask'+name] = name
def nonotify(name): renames['Notify'+name] = name
noask('Recovery')
noask('LastIDs')
......@@ -35,6 +35,12 @@ noask('FinalTID')
noask('BeginTransaction')
noask('FinishTransaction')
noask('LockInformation')
#nonotify('UnlockInformation') # XXX ok?
noask('RebaseTransaction')
noask('RebaseObject')
noask('StoreObject')
noask('StoreTransaction')
noask('VoteTransaction')
def main():
......
......@@ -1316,21 +1316,21 @@ overflow:
return 0, ErrDecodeOverflow
}
// 35. UnlockInformation
// 35. NotifyUnlockInformation
func (*UnlockInformation) neoMsgCode() uint16 {
func (*NotifyUnlockInformation) neoMsgCode() uint16 {
return 35
}
func (p *UnlockInformation) neoMsgEncodedLen() int {
func (p *NotifyUnlockInformation) neoMsgEncodedLen() int {
return 8
}
func (p *UnlockInformation) neoMsgEncode(data []byte) {
func (p *NotifyUnlockInformation) neoMsgEncode(data []byte) {
binary.BigEndian.PutUint64(data[0:], uint64(p.TTID))
}
func (p *UnlockInformation) neoMsgDecode(data []byte) (int, error) {
func (p *NotifyUnlockInformation) neoMsgDecode(data []byte) (int, error) {
if uint32(len(data)) < 8 {
goto overflow
}
......@@ -1414,22 +1414,22 @@ overflow:
return 0, ErrDecodeOverflow
}
// 38. Deadlock
// 38. NotifyDeadlock
func (*Deadlock) neoMsgCode() uint16 {
func (*NotifyDeadlock) neoMsgCode() uint16 {
return 38
}
func (p *Deadlock) neoMsgEncodedLen() int {
func (p *NotifyDeadlock) neoMsgEncodedLen() int {
return 16
}
func (p *Deadlock) neoMsgEncode(data []byte) {
func (p *NotifyDeadlock) neoMsgEncode(data []byte) {
binary.BigEndian.PutUint64(data[0:], uint64(p.TTid))
binary.BigEndian.PutUint64(data[8:], uint64(p.LockingTid))
}
func (p *Deadlock) neoMsgDecode(data []byte) (int, error) {
func (p *NotifyDeadlock) neoMsgDecode(data []byte) (int, error) {
if uint32(len(data)) < 16 {
goto overflow
}
......@@ -3474,10 +3474,10 @@ var msgTypeRegistry = map[uint16]reflect.Type{
32: reflect.TypeOf(LockInformation{}),
33 | answerBit: reflect.TypeOf(AnswerInformationLocked{}),
34: reflect.TypeOf(InvalidateObjects{}),
35: reflect.TypeOf(UnlockInformation{}),
35: reflect.TypeOf(NotifyUnlockInformation{}),
36: reflect.TypeOf(AskNewOIDs{}),
37 | answerBit: reflect.TypeOf(AnswerNewOIDs{}),
38: reflect.TypeOf(Deadlock{}),
38: reflect.TypeOf(NotifyDeadlock{}),
39: reflect.TypeOf(RebaseTransaction{}),
40 | answerBit: reflect.TypeOf(AnswerRebaseTransaction{}),
41: reflect.TypeOf(RebaseObject{}),
......
......@@ -27,12 +27,12 @@ var pyMsgRegistry = map[uint16]string{
35: "NotifyUnlockInformation",
36: "AskNewOIDs",
38: "NotifyDeadlock",
39: "AskRebaseTransaction",
41: "AskRebaseObject",
43: "AskStoreObject",
39: "RebaseTransaction",
41: "RebaseObject",
43: "StoreObject",
45: "AbortTransaction",
46: "AskStoreTransaction",
48: "AskVoteTransaction",
46: "StoreTransaction",
48: "VoteTransaction",
50: "AskObject",
52: "AskTIDs",
54: "AskTransactionInformation",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment