consul/proto/pbpeering
freddygv 6c8ab1bbac Fixup stream tear-down steps.
1. Fix a bug where the peering leader routine would not track all active
   peerings in the "stored" reconciliation map. This could lead to
   tearing down streams where the token was generated, since the
   ConnectedStreams() method used for reconciliation returns all streams
   and not just the ones initiated by this leader routine.

2. Fix a race where stream contexts were being canceled before
   termination messages were being processed by a peer.

   Previously the leader routine would tear down streams by canceling
   their context right after the termination message was sent. This
   context cancelation could be propagated to the server side faster
   than the termination message. Now there is a change where the
   dialing peer uses CloseSend() to signal when no more messages will
   be sent. Eventually the server peer will read an EOF after receiving
   and processing the preceding termination message.

   Using CloseSend() is actually not enough to address the issue
   mentioned, since it doesn't wait for the server peer to finish
   processing messages. Because of this now the dialing peer also reads
   from the stream until an error signals that there are no more
   messages. Receiving an EOF from our peer indicates that they
   processed the termination message and have no additional work to do.

   Given that the stream is being closed, all the messages received by
   Recv are discarded. We only check for errors to avoid importing new
   data.
2022-06-13 12:10:42 -06:00
..
generate.go peering: initial sync (#12842) 2022-04-21 17:34:40 -05:00
peering.gen.go Update peering state and RPC for deferred deletion 2022-06-13 12:10:32 -06:00
peering.go Fixup stream tear-down steps. 2022-06-13 12:10:42 -06:00
peering.pb.binary.go peering: rename initiate to establish in the context of the APIs (#13419) 2022-06-10 11:10:46 -05:00
peering.pb.go Update peering state and RPC for deferred deletion 2022-06-13 12:10:32 -06:00
peering.proto Update peering state and RPC for deferred deletion 2022-06-13 12:10:32 -06:00
peering.rpcglue.pb.go peering: rename initiate to establish in the context of the APIs (#13419) 2022-06-10 11:10:46 -05:00
peering_grpc.pb.go peering: rename initiate to establish in the context of the APIs (#13419) 2022-06-10 11:10:46 -05:00
peering_oss.go peering: initial sync (#12842) 2022-04-21 17:34:40 -05:00
types.go Add support for streaming CA roots to peers (#13260) 2022-05-26 15:24:09 -04:00