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

.

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