aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Sree Kuchibhotla <sreecha@users.noreply.github.com>2018-09-29 16:10:29 -0700
committerGravatar GitHub <noreply@github.com>2018-09-29 16:10:29 -0700
commit616b119aa63619ee5f1324cd57a5f7158f9b5c36 (patch)
tree8dabb5666525f95865e14fd9e1c634ed46ef97c8
parent4383673bc277d6f3cf4296a9baf3cb9c0fdbcf85 (diff)
parentf443f185b3dd4b694e9719d7e730e98396416ce8 (diff)
Merge pull request #16726 from sreecha/sreek-ep
Add comments in tcp_posix.cc on what 'covering' a write means
-rw-r--r--src/core/lib/iomgr/tcp_posix.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/lib/iomgr/tcp_posix.cc b/src/core/lib/iomgr/tcp_posix.cc
index ac1e919acb..e40bf81c90 100644
--- a/src/core/lib/iomgr/tcp_posix.cc
+++ b/src/core/lib/iomgr/tcp_posix.cc
@@ -204,6 +204,13 @@ static void drop_uncovered(grpc_tcp* tcp) {
GPR_ASSERT(old_count != 1);
}
+// gRPC API considers a Write operation to be done the moment it clears ‘flow
+// control’ i.e., not necessarily sent on the wire. This means that the
+// application MIGHT not call `grpc_completion_queue_next/pluck` in a timely
+// manner when its `Write()` API is acked.
+//
+// We need to ensure that the fd is 'covered' (i.e being monitored by some
+// polling thread and progress is made) and hence add it to a backup poller here
static void cover_self(grpc_tcp* tcp) {
backup_poller* p;
gpr_atm old_count =