{"push_id":1195022373,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"527fd67cc89a562cbdccd0f141ca6d186b653289","before":"e80b136495cf6511d61a17300fa1c43e8e7c2898","commits":[{"sha":"527fd67cc89a562cbdccd0f141ca6d186b653289","author":{"name":"Kun Zhang","email":"eda4b6355fdd52dcb766d3bd6cd1c0f2d82fab09@google.com"},"message":"core: Channel Idleness\n\nResolves #1276\n\nIdle mode is where the channel does not keep live connections, and does\nnot have running NameResolver and LoadBalancer.\n\nTransportSet aggregates the in-use state of transports, including the\ndelayed transport and real transports. Channel aggregates the in-use\nstate of TransportSets and delayed tranports.\n\nChannel starts in idle mode. It exits idle mode if one of the following\noccurs:\n 1. A new Call requests for a transport.\n 2. The channel's in-use state turns to true.\n 3. Someone calls exitIdleMode().\n\nChannel enters the idle mode if its in-use state has been false for the\nconfigured timeout (disabled by default). It shuts down all\nTransportSets, NameResolver and LoadBalancer. Interim transports and OOB\ntransports are LoadBalancer's responsibility.\n\nThere is a race that could cause annoyance if IDLE_TIMEOUT was too\nsmall (e.g., 0). A TransportSet's delayed transport is holding streams,\nwhich keeps its in-use state in true. When a real transport is ready,\nall streams are transferred to the real transport, immediately after\nwhich the delayed transport's in-use state turns to false, while the\nreal transport's in-use state may have not turned to true, because some\ntransport (e.g. netty) may have a brief delay between newStream() being\ncalled and the stream being created internally. This could cause the\nchannel's aggregated in-use state be in false for a brief time, if which\nis longer than IDLE_TIMEOUT, could make channel go to idle mode. Even\nthough the channel would go back to non-idle again, idle mode would\nshutdown all transports and NameResolver and LoadBalancer which leads to\nspurious error in the application.\n\nWe minimize the chance of such race by setting the minimum timeout to 1\nsecond.\n\nRelated chanes:\n- ManagedChannelImplTest now switched to use fake executors.\n- Turn a few anonymous runnables into named classes. This is more useful for debugging.","distinct":true,"url":"https://api.github.com/repos/grpc/grpc-java/commits/527fd67cc89a562cbdccd0f141ca6d186b653289"}]}
{"actor":{"display_login":"zhangkun83"}}