1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-09 17:45:03 +09:00

Fix replyId update and add goroutine in handleMessage

This commit is contained in:
mcrakhman 2022-08-05 21:05:47 +02:00 committed by Mikhail Iudin
parent 1c81926f35
commit 1a892b05cf
No known key found for this signature in database
GPG key ID: FAAAA8BAABDFF1C0
8 changed files with 158 additions and 101 deletions

View file

@ -98,7 +98,7 @@ func (s *service) createDocument(w http.ResponseWriter, req *http.Request) {
query = req.URL.Query() query = req.URL.Query()
text = query.Get("text") text = query.Get("text")
) )
timeoutCtx, cancel := context.WithTimeout(context.Background(), time.Second*5) timeoutCtx, cancel := context.WithTimeout(context.Background(), time.Second*30)
treeId, err := s.documentService.CreateDocument(timeoutCtx, fmt.Sprintf("created document with id: %s", text)) treeId, err := s.documentService.CreateDocument(timeoutCtx, fmt.Sprintf("created document with id: %s", text))
cancel() cancel()
if err != nil { if err != nil {
@ -114,7 +114,7 @@ func (s *service) appendDocument(w http.ResponseWriter, req *http.Request) {
text = query.Get("text") text = query.Get("text")
treeId = query.Get("treeId") treeId = query.Get("treeId")
) )
timeoutCtx, cancel := context.WithTimeout(context.Background(), time.Second*5) timeoutCtx, cancel := context.WithTimeout(context.Background(), time.Second*30)
err := s.documentService.UpdateDocument(timeoutCtx, treeId, text) err := s.documentService.UpdateDocument(timeoutCtx, treeId, text)
cancel() cancel()
if err != nil { if err != nil {

View file

@ -3,6 +3,7 @@ package pool
import ( import (
"github.com/anytypeio/go-anytype-infrastructure-experiments/service/net/peer" "github.com/anytypeio/go-anytype-infrastructure-experiments/service/net/peer"
"github.com/anytypeio/go-anytype-infrastructure-experiments/syncproto" "github.com/anytypeio/go-anytype-infrastructure-experiments/syncproto"
"go.uber.org/zap"
"gopkg.in/mgo.v2/bson" "gopkg.in/mgo.v2/bson"
) )
@ -43,6 +44,7 @@ func (m *Message) Ack() (err error) {
}, },
Data: data, Data: data,
} }
log.With(zap.String("header", rep.Header.String())).Info("sending ack to peer")
return m.peer.Send(rep) return m.peer.Send(rep)
} }

View file

@ -15,7 +15,10 @@ import (
"sync/atomic" "sync/atomic"
) )
const CName = "sync/peerPool" const (
CName = "sync/peerPool"
maxSimultaneousOperationsPerStream = 10
)
var log = logger.NewNamed("peerPool") var log = logger.NewNamed("peerPool")
@ -45,7 +48,7 @@ type Pool interface {
type pool struct { type pool struct {
peersById map[string]*peerEntry peersById map[string]*peerEntry
waiters waiters waiters *waiters
handlers map[syncproto.MessageType][]Handler handlers map[syncproto.MessageType][]Handler
peersIdsByGroup map[string][]string peersIdsByGroup map[string][]string
@ -60,7 +63,7 @@ func (p *pool) Init(ctx context.Context, a *app.App) (err error) {
p.peersById = map[string]*peerEntry{} p.peersById = map[string]*peerEntry{}
p.handlers = map[syncproto.MessageType][]Handler{} p.handlers = map[syncproto.MessageType][]Handler{}
p.peersIdsByGroup = map[string][]string{} p.peersIdsByGroup = map[string][]string{}
p.waiters = waiters{waiters: map[uint64]*waiter{}} p.waiters = &waiters{waiters: map[uint64]*waiter{}}
p.dialer = a.MustComponent(dialer.CName).(dialer.Dialer) p.dialer = a.MustComponent(dialer.CName).(dialer.Dialer)
p.wg = &sync.WaitGroup{} p.wg = &sync.WaitGroup{}
return nil return nil
@ -160,6 +163,7 @@ func (p *pool) SendAndWait(ctx context.Context, peerId string, msg *syncproto.Me
repId := p.waiters.NewReplyId() repId := p.waiters.NewReplyId()
msg.GetHeader().RequestId = repId msg.GetHeader().RequestId = repId
ch := make(chan Reply, 1) ch := make(chan Reply, 1)
log.With(zap.Uint64("reply id", repId)).Debug("adding waiter for reply id")
p.waiters.Add(repId, &waiter{ch: ch}) p.waiters.Add(repId, &waiter{ch: ch})
defer p.waiters.Remove(repId) defer p.waiters.Remove(repId)
if err = peer.peer.Send(msg); err != nil { if err = peer.peer.Send(msg); err != nil {
@ -172,24 +176,41 @@ func (p *pool) SendAndWait(ctx context.Context, peerId string, msg *syncproto.Me
} }
return nil return nil
case <-ctx.Done(): case <-ctx.Done():
log.Debug("context error happened in send and wait")
return ctx.Err() return ctx.Err()
} }
} }
func (p *pool) Broadcast(ctx context.Context, groupId string, msg *syncproto.Message) (err error) { func (p *pool) Broadcast(ctx context.Context, groupId string, msg *syncproto.Message) (err error) {
//TODO implement me //TODO implement me
panic("implement me") panic("implement me")
} }
func (p *pool) readPeerLoop(peer peer.Peer) (err error) { func (p *pool) readPeerLoop(peer peer.Peer) (err error) {
defer p.wg.Done() defer p.wg.Done()
limiter := make(chan struct{}, maxSimultaneousOperationsPerStream)
for i := 0; i < maxSimultaneousOperationsPerStream; i++ {
limiter <- struct{}{}
}
Loop:
for { for {
msg, err := peer.Recv() msg, err := peer.Recv()
if err != nil { if err != nil {
log.Debug("peer receive error", zap.Error(err), zap.String("peerId", peer.Id())) log.Debug("peer receive error", zap.Error(err), zap.String("peerId", peer.Id()))
break break
} }
p.handleMessage(peer, msg) select {
case <-limiter:
case <-peer.Context().Done():
break Loop
}
go func() {
defer func() {
limiter <- struct{}{}
}()
p.handleMessage(peer, msg)
}()
} }
if err = p.removePeer(peer.Id()); err != nil { if err = p.removePeer(peer.Id()); err != nil {
log.Error("remove peer error", zap.String("peerId", peer.Id())) log.Error("remove peer error", zap.String("peerId", peer.Id()))
@ -209,7 +230,8 @@ func (p *pool) removePeer(peerId string) (err error) {
} }
func (p *pool) handleMessage(peer peer.Peer, msg *syncproto.Message) { func (p *pool) handleMessage(peer peer.Peer, msg *syncproto.Message) {
log.With(zap.String("peerId", peer.Id())).Debug("received message from peer") log.With(zap.String("peerId", peer.Id()), zap.String("header", msg.GetHeader().String())).
Debug("received message from peer")
replyId := msg.GetHeader().GetReplyId() replyId := msg.GetHeader().GetReplyId()
if replyId != 0 { if replyId != 0 {
if !p.waiters.Send(replyId, Reply{ if !p.waiters.Send(replyId, Reply{
@ -219,7 +241,7 @@ func (p *pool) handleMessage(peer peer.Peer, msg *syncproto.Message) {
peer: peer, peer: peer,
}, },
}) { }) {
log.Debug("received reply with unknown (or expired) replyId", zap.Uint64("replyId", replyId)) log.Debug("received reply with unknown (or expired) replyId", zap.Uint64("replyId", replyId), zap.String("header", msg.GetHeader().String()))
} }
return return
} }
@ -262,7 +284,7 @@ type waiters struct {
mu sync.Mutex mu sync.Mutex
} }
func (w waiters) Send(replyId uint64, r Reply) (ok bool) { func (w *waiters) Send(replyId uint64, r Reply) (ok bool) {
w.mu.Lock() w.mu.Lock()
wait := w.waiters[replyId] wait := w.waiters[replyId]
if wait == nil { if wait == nil {
@ -282,13 +304,13 @@ func (w waiters) Send(replyId uint64, r Reply) (ok bool) {
return true return true
} }
func (w waiters) Add(replyId uint64, wait *waiter) { func (w *waiters) Add(replyId uint64, wait *waiter) {
w.mu.Lock() w.mu.Lock()
w.waiters[replyId] = wait w.waiters[replyId] = wait
w.mu.Unlock() w.mu.Unlock()
} }
func (w waiters) Remove(id uint64) error { func (w *waiters) Remove(id uint64) error {
w.mu.Lock() w.mu.Lock()
defer w.mu.Unlock() defer w.mu.Unlock()
if _, ok := w.waiters[id]; ok { if _, ok := w.waiters[id]; ok {
@ -298,7 +320,7 @@ func (w waiters) Remove(id uint64) error {
return fmt.Errorf("waiter not found") return fmt.Errorf("waiter not found")
} }
func (w waiters) NewReplyId() uint64 { func (w *waiters) NewReplyId() uint64 {
res := atomic.AddUint64(&w.replySeq, 1) res := atomic.AddUint64(&w.replySeq, 1)
if res == 0 { if res == 0 {
return w.NewReplyId() return w.NewReplyId()

View file

@ -63,6 +63,9 @@ func (s *service) HandleMessage(ctx context.Context, msg *pool.Message) (err err
if err != nil { if err != nil {
log.With(zap.String("peerId", msg.Peer().Id()), zap.Error(err)). log.With(zap.String("peerId", msg.Peer().Id()), zap.Error(err)).
Error("could not ack message") Error("could not ack message")
} else {
log.With(zap.String("peerId", msg.Peer().Id()), zap.Int("type", int(msg.Header.Type))).
Debug("ack returned")
} }
syncMsg := &syncproto.Sync{} syncMsg := &syncproto.Sync{}
err = proto.Unmarshal(msg.Data, syncMsg) err = proto.Unmarshal(msg.Data, syncMsg)
@ -70,7 +73,7 @@ func (s *service) HandleMessage(ctx context.Context, msg *pool.Message) (err err
return err return err
} }
timeoutCtx, cancel := context.WithTimeout(ctx, time.Second*5) timeoutCtx, cancel := context.WithTimeout(ctx, time.Second*30)
defer cancel() defer cancel()
return s.requestHandler.HandleSyncMessage(timeoutCtx, msg.Peer().Id(), syncMsg) return s.requestHandler.HandleSyncMessage(timeoutCtx, msg.Peer().Id(), syncMsg)
} }
@ -95,50 +98,26 @@ func (s *service) SendMessage(ctx context.Context, peerId string, msg *syncproto
Header: &syncproto.Header{Type: syncproto.MessageType_MessageTypeSync}, Header: &syncproto.Header{Type: syncproto.MessageType_MessageTypeSync},
Data: marshalled, Data: marshalled,
}) })
if err != nil { if err != nil {
log.With( log.With(
zap.String("peerId", peerId), zap.String("peerId", peerId),
zap.String("message", msgType(msg)), zap.String("message", msgType(msg)),
zap.Error(err)). zap.Error(err)).
Error("failed to send message to peer") Debug("failed to send message to peer")
} else {
log.With(
zap.String("peerId", peerId),
zap.String("message", msgType(msg))).
Debug("message send to peer completed")
} }
return err return err
} }
func (s *service) SendToSpace(ctx context.Context, spaceId string, msg *syncproto.Sync) error { func (s *service) SendToSpace(ctx context.Context, spaceId string, msg *syncproto.Sync) error {
// dial manually to all peers
for _, rp := range s.nodes { for _, rp := range s.nodes {
if er := s.pool.DialAndAddPeer(context.Background(), rp.PeerId); er != nil { s.SendMessage(ctx, rp.PeerId, msg)
log.Info("can't dial to peer", zap.Error(er))
} else {
log.Info("connected with peer", zap.String("peerId", rp.PeerId))
}
} }
marshalled, err := proto.Marshal(msg)
if err != nil {
return err
}
// TODO: use Broadcast method here when it is ready
for _, n := range s.nodes {
log.With(
zap.String("peerId", n.PeerId),
zap.String("message", msgType(msg))).
Debug("sending message to peer")
err := s.pool.SendAndWait(ctx, n.PeerId, &syncproto.Message{
Header: &syncproto.Header{Type: syncproto.MessageType_MessageTypeSync},
Data: marshalled,
})
if err != nil {
log.With(
zap.String("peerId", n.PeerId),
zap.String("message", msgType(msg)),
zap.Error(err)).
Error("failed to send message to peer")
}
}
return nil return nil
} }

View file

@ -164,7 +164,7 @@ func (r *requestHandler) HandleFullSyncRequest(ctx context.Context, senderId str
TreeId: request.TreeId, TreeId: request.TreeId,
TreeHeader: request.TreeHeader, TreeHeader: request.TreeHeader,
} }
return r.messageService.SendToSpace(ctx, "", syncproto.WrapHeadUpdate(newUpdate)) return r.messageService.SendToSpace(ctx, "def", syncproto.WrapHeadUpdate(newUpdate))
} }
func (r *requestHandler) HandleFullSyncResponse(ctx context.Context, senderId string, response *syncproto.SyncFullResponse) (err error) { func (r *requestHandler) HandleFullSyncResponse(ctx context.Context, senderId string, response *syncproto.SyncFullResponse) (err error) {

View file

@ -15,6 +15,7 @@ import (
const CName = "treecache" const CName = "treecache"
// TODO: add context
type ACLTreeFunc = func(tree acltree.ACLTree) error type ACLTreeFunc = func(tree acltree.ACLTree) error
type ChangeBuildFunc = func(builder acltree.ChangeBuilder) error type ChangeBuildFunc = func(builder acltree.ChangeBuilder) error

View file

@ -15,6 +15,7 @@ message Header {
uint64 requestId = 2; uint64 requestId = 2;
uint64 replyId = 3; uint64 replyId = 3;
MessageType type = 4; MessageType type = 4;
string debugInfo = 5;
} }
enum MessageType { enum MessageType {

View file

@ -134,6 +134,7 @@ type Header struct {
RequestId uint64 `protobuf:"varint,2,opt,name=requestId,proto3" json:"requestId,omitempty"` RequestId uint64 `protobuf:"varint,2,opt,name=requestId,proto3" json:"requestId,omitempty"`
ReplyId uint64 `protobuf:"varint,3,opt,name=replyId,proto3" json:"replyId,omitempty"` ReplyId uint64 `protobuf:"varint,3,opt,name=replyId,proto3" json:"replyId,omitempty"`
Type MessageType `protobuf:"varint,4,opt,name=type,proto3,enum=anytype.MessageType" json:"type,omitempty"` Type MessageType `protobuf:"varint,4,opt,name=type,proto3,enum=anytype.MessageType" json:"type,omitempty"`
DebugInfo string `protobuf:"bytes,5,opt,name=debugInfo,proto3" json:"debugInfo,omitempty"`
} }
func (m *Header) Reset() { *m = Header{} } func (m *Header) Reset() { *m = Header{} }
@ -197,6 +198,13 @@ func (m *Header) GetType() MessageType {
return MessageType_MessageTypeSystem return MessageType_MessageTypeSystem
} }
func (m *Header) GetDebugInfo() string {
if m != nil {
return m.DebugInfo
}
return ""
}
type System struct { type System struct {
Handshake *SystemHandshake `protobuf:"bytes,1,opt,name=handshake,proto3" json:"handshake,omitempty"` Handshake *SystemHandshake `protobuf:"bytes,1,opt,name=handshake,proto3" json:"handshake,omitempty"`
Ping *SystemPing `protobuf:"bytes,2,opt,name=ping,proto3" json:"ping,omitempty"` Ping *SystemPing `protobuf:"bytes,2,opt,name=ping,proto3" json:"ping,omitempty"`
@ -1020,61 +1028,62 @@ func init() {
func init() { proto.RegisterFile("syncproto/proto/sync.proto", fileDescriptor_4b28dfdd48a89166) } func init() { proto.RegisterFile("syncproto/proto/sync.proto", fileDescriptor_4b28dfdd48a89166) }
var fileDescriptor_4b28dfdd48a89166 = []byte{ var fileDescriptor_4b28dfdd48a89166 = []byte{
// 851 bytes of a gzipped FileDescriptorProto // 868 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0x41, 0x8f, 0xdb, 0x44, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0xd1, 0x8e, 0xda, 0x46,
0x14, 0xb6, 0x13, 0x27, 0x6e, 0x5e, 0xa2, 0xac, 0x99, 0xb6, 0x60, 0xdc, 0x2a, 0x8a, 0xac, 0x02, 0x14, 0x65, 0xc0, 0x40, 0xb8, 0x20, 0xd6, 0x9d, 0x24, 0xad, 0xeb, 0x44, 0x08, 0xa1, 0xb4, 0x45,
0x51, 0xa9, 0xbc, 0x55, 0xa0, 0x42, 0xe2, 0xd6, 0x2e, 0xbb, 0x4a, 0x44, 0x49, 0xa2, 0x49, 0xb2, 0x69, 0xe4, 0x8d, 0x68, 0x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, 0xe9, 0xdd, 0x6a, 0xe1, 0x77, 0x04, 0xb7, 0xd2, 0x53, 0x79,
0xe8, 0x1e, 0x7c, 0x50, 0x84, 0x0b, 0xa3, 0xc3, 0xd2, 0xd1, 0x6d, 0x38, 0xba, 0xa1, 0x61, 0xbe, 0xb7, 0xac, 0x3f, 0x3c, 0x87, 0x66, 0xee, 0x37, 0x07, 0xdf, 0x85, 0xf7, 0x72, 0xa1, 0x9e, 0x8b,
0x55, 0x79, 0xf6, 0xe0, 0xaf, 0xab, 0x8e, 0xfe, 0xea, 0xaa, 0xa3, 0xff, 0x73, 0xd5, 0xd1, 0x5f, 0x66, 0x09, 0xdf, 0x83, 0x0f, 0xf2, 0x70, 0x6e, 0x74, 0x98, 0x08, 0xdf, 0x86, 0xa3, 0x6b, 0x1a,
0x5e, 0x77, 0xb4, 0x57, 0xd7, 0x1d, 0xed, 0xef, 0xeb, 0x8e, 0xf6, 0x1d, 0x1c, 0xef, 0x7e, 0x07, 0xee, 0x9a, 0xe5, 0x67, 0x0f, 0xfe, 0xbc, 0xec, 0xa0, 0xd7, 0x97, 0x1d, 0xf4, 0xf7, 0x65, 0x07,
0x5c, 0xd4, 0xe5, 0xc7, 0x67, 0xaf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x41, 0xe9, 0x79, 0xe5, 0x1b, 0xbd, 0xba, 0xea, 0x94, 0x5e, 0x5f, 0x75, 0x4a, 0x7f, 0x5d, 0x75, 0x4a, 0xdf, 0xc1, 0xf1, 0xe1,
0x08, 0x00, 0x00, 0x5f, 0xc2, 0xb2, 0xa6, 0x3e, 0x3e, 0xfb, 0x3f, 0x00, 0x00, 0xff, 0xff, 0x7a, 0xad, 0xe7, 0x46,
0x39, 0x08, 0x00, 0x00,
} }
func (m *Message) Marshal() (dAtA []byte, err error) { func (m *Message) Marshal() (dAtA []byte, err error) {
@ -1139,6 +1148,13 @@ func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i _ = i
var l int var l int
_ = l _ = l
if len(m.DebugInfo) > 0 {
i -= len(m.DebugInfo)
copy(dAtA[i:], m.DebugInfo)
i = encodeVarintSync(dAtA, i, uint64(len(m.DebugInfo)))
i--
dAtA[i] = 0x2a
}
if m.Type != 0 { if m.Type != 0 {
i = encodeVarintSync(dAtA, i, uint64(m.Type)) i = encodeVarintSync(dAtA, i, uint64(m.Type))
i-- i--
@ -1887,6 +1903,10 @@ func (m *Header) Size() (n int) {
if m.Type != 0 { if m.Type != 0 {
n += 1 + sovSync(uint64(m.Type)) n += 1 + sovSync(uint64(m.Type))
} }
l = len(m.DebugInfo)
if l > 0 {
n += 1 + l + sovSync(uint64(l))
}
return n return n
} }
@ -2433,6 +2453,38 @@ func (m *Header) Unmarshal(dAtA []byte) error {
break break
} }
} }
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field DebugInfo", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSync
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthSync
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthSync
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.DebugInfo = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skipSync(dAtA[iNdEx:]) skippy, err := skipSync(dAtA[iNdEx:])