@@ -214,6 +214,7 @@ func (s *BlockStore) AppendManyStream(ctx context.Context, block uint64, events
214214 _ctx , span := s .tracer .Start (ctx , "AppendManyStream" )
215215 defer span .End ()
216216
217+ log .Error (ctx , "===jk1===" , nil )
217218 var (
218219 err error
219220 wg sync.WaitGroup
@@ -239,7 +240,7 @@ func (s *BlockStore) AppendManyStream(ctx context.Context, block uint64, events
239240 if err != nil {
240241 return nil , err
241242 }
242- eventpbs = append ( eventpbs , eventpb )
243+ eventpbs [ idx ] = eventpb
243244 }
244245
245246 s .appendCallbacks .Store (requestID , appendCallback (func (res * segpb.AppendToBlockStreamResponse ) {
@@ -255,6 +256,10 @@ func (s *BlockStore) AppendManyStream(ctx context.Context, block uint64, events
255256 },
256257 }
257258
259+ log .Error (ctx , "===jk2===" , map [string ]interface {}{
260+ "RequestId" : requestID ,
261+ })
262+
258263 if err = s .appendStream .Send (req ); err != nil {
259264 log .Error (ctx , "append stream send failed" , map [string ]interface {}{
260265 log .KeyError : err ,
@@ -277,6 +282,10 @@ func (s *BlockStore) AppendManyStream(ctx context.Context, block uint64, events
277282
278283 wg .Wait ()
279284
285+ log .Error (ctx , "===jk3===" , map [string ]interface {}{
286+ "ResponseId" : resp .ResponseId ,
287+ })
288+
280289 if resp .ResponseCode == errpb .ErrorCode_FULL {
281290 log .Warning (ctx , "block append failed cause the segment is full" , nil )
282291 return nil , errors .ErrFull .WithMessage ("segment is full" )
0 commit comments