envoyproxy/envoy

[dataplane] reset ActiveStream::streamInfo().route() when clearRouteCache()

オープン

#20,157 opened on 2022/03/01

 (5 件のコメント) (0 件のリアクション) (1 人の担当者)C++ (5,373 件のフォーク)batch import
area/httpbughelp wanted

Repository metrics

Stars
 (27,997 個のスター)
PR merge metrics
 (平均マージ 8d) (30d で 378 merged PRs)

説明

Title: reset ActiveStream::streamInfo().route() when clearRouteCache()

Description: There is a gap between the ActiveStreamFilterBase::clearRouteCache and ActiveStreamFilterBase::streamInfo()::route():

whenever we call clearRouteCache(), the {en,de}coder_callback_.route() ONLY!, the streamInfo().route() is NOT updated.

The "new" route() on {en,de}coder_callback_ will be reset when we refreshCachedRoute(), by either explicitly calling it, or calling {en,de}coder_callback_.route().

So after a clearCachedRoute(), the route() on streamInfo is "stale" and will be out-of-date until refreshCachedRoute() is called.

we should explicitly clear/reset streamINfo()::route_ in clearRouteCache()

コントリビューターガイド